Skip to content

OutputFlags

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

OutputFlags

OutputFlags control which fields are included in log output and how they are formatted.

They may be configured per channel or overridden per message.


OutputFlags Structure

union OutputFlags
{
  uint32_t Value;

  struct
  {
    uint32_t Timestamp : 2;     // TimeFormat
    uint32_t Signature : 1;     // Severity signature
    uint32_t Location : 2;      // Detality
    uint32_t Method : 1;        // MethodName(): 
    uint32_t Eol : 1;           // Append \n
    uint32_t ErrorPrefix : 1;   // Error / Critical prefix
    uint32_t Duration : 1;      // Procedure duration
    uint32_t ThreadID : 1;      // Thread ID
    uint32_t ProcessID : 1;     // Process ID
    uint32_t Channel : 1;       // Channel name
    uint32_t Highlight : 1;     // Console highlighting
    uint32_t Console : 3;       // ConsoleStream
    uint32_t DisableLink : 1;   // Disable linked channel routing
    uint32_t ThreadTransition : 1; // Thread ID ↔ name transitions
    uint32_t Subsystem : 1;     // Subsystem name
    uint32_t : 10;
    uint32_t ProcPrint : 1;
    uint32_t ProcPrintIn : 1;
    uint32_t None : 1;
  };
};

Default OutputFlags

By default, the following flags are enabled:

Timestamp = true;
Signature = true;
Method = true;
ErrorPrefix = true;
Highlight = true;
Eol = true;
ThreadTransition = true;

Duration

OutputFlags.Duration enables printing procedure execution time.

Used only with LogmeP macros.


Highlight

Console backend only.

Controls automatic severity-based coloring. If disabled, no automatic highlighting is applied.


DisableLink

Prevents message routing to linked channels.

Typically set using an override to temporarily suppress duplication.


ThreadTransition

Controls whether thread name transitions (ID -> Name) are logged.

If disabled, thread name is printed immediately.


Modifying Flags

Per Channel

OutputFlags flags = channel->GetFlags();
flags.Method = false;
channel->SetFlags(flags);

Per Message (Override)

Logme::Override ovr;
ovr.Add.DisableLink = true;

LogI(ovr, "Establishing connection");

Overrides apply only to the current log message.

Clone this wiki locally