Skip to content

Output Format

Eduard Mishkurov edited this page Jan 7, 2026 · 1 revision

Log Output Format

logme produces log messages using a well-defined field order. Individual fields can be enabled, disabled, or formatted using OutputFlags.

The logical order of fields in a log message is:

<time><signature><[proc:thread]><{channel_name}><#subsystem><location><error prefix><code_method><message><eol>

Not all fields are always present. Their presence depends on OutputFlags.


Field Description

Time

Timestamp of the log message.

Controlled by OutputFlags.Timestamp using TimeFormat:

enum TimeFormat
{
  TIME_FORMAT_NONE,
  TIME_FORMAT_LOCAL,
  TIME_FORMAT_TZ,
  TIME_FORMAT_UTC,
};

Signature

Single-character severity signature:

  • D — Debug
  • (empty) — Info
  • W — Warning
  • E — Error
  • C — Critical Error

Info messages intentionally have no signature to reduce visual noise.

Controlled by OutputFlags.Signature.


[proc:thread]

Process and thread identifier.

  • Printed only if ThreadID or ProcessID is enabled
  • Format: [proc:thread]
  • Either part may be omitted

Thread Naming and Transitions

Threads may be assigned names. If a thread name is set using SetThreadName, the first log entry shows a transition:

:380 -> StartIO

When a name is removed:

:StartIO -> 380

This behavior is controlled by OutputFlags.ThreadTransition.


{channel_name}

Name of the channel specified by the user when emitting the log message.

This may differ from the channel that actually outputs the message, due to linked channels and routing.

Controlled by OutputFlags.Channel.


#subsystem

Name of the subsystem associated with the log message.

Subsystems allow logical grouping of messages independently of channels. They can be enabled or disabled selectively.

Controlled by OutputFlags.Subsystem.


Location

Source code location where the message was emitted.

Controlled by OutputFlags.Location using Detality:

enum Detality
{
  DETALITY_NONE,
  DETALITY_SHORT,
  DETALITY_FULL
};
  • NONE — not printed
  • SHORT — module name and line
  • FULL — full path and line

Printed as:

file:line

Error Prefix

Automatically prepended for error-level messages:

  • Error:
  • Critical:

Controlled by OutputFlags.ErrorPrefix.


Code Method

Name of the method that emitted the log message.

Printed as:

MethodName():

Controlled by OutputFlags.Method.


Message

The actual user-provided log message.


EOL

End-of-line character.

Controlled by OutputFlags.Eol.

Clone this wiki locally