Struct thl::Logger::LogRecord#

struct LogRecord#

Collaboration diagram for thl::Logger::LogRecord:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="std::basic_string< Char >" tooltip="std::basic_string< Char >"] "2" [label="std::string" tooltip="std::string"] "1" [label="thl::Logger::LogRecord" tooltip="thl::Logger::LogRecord" fillcolor="#BFBFBF"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="usage"] }

A single log entry produced by the logger.

Used in-process only (no ABI promise across library versions). New members are appended at the end, with a default, so that existing brace initialisers and positional reads keep their meaning.

Public Members

std::uint64_t m_seq = 0#

Monotonic sequence number.

std::int64_t m_timestamp_ms = 0#

Wall-clock UTC epoch (ms).

std::uint64_t m_monotonic_ns = 0#

Steady-clock epoch (ns).

std::uint32_t m_level = static_cast<std::uint32_t>(LogLevel::Info)#

Severity level.

std::string m_group#

Logical group tag.

std::string m_message#

Formatted message body.

std::string m_source#

Origin identifier (e.g. “native”).

std::uint32_t m_flags = 0#

Bit set of k_flag_* values (see “Record flags”).

std::uint64_t m_dropped_before = 0#

Real-time records lost to a full queue that are reported on this record: the count a rt::Queue::drain() pass took from its drop counter rides on the first record the pass dispatches (see Queue::drain()).

Zero on every other record. Summing it over all records received counts every drop exactly once.