-
Notifications
You must be signed in to change notification settings - Fork 2
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.
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,
};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.
Process and thread identifier.
- Printed only if
ThreadIDorProcessIDis enabled - Format:
[proc:thread] - Either part may be omitted
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.
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.
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.
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
Automatically prepended for error-level messages:
Error:Critical:
Controlled by OutputFlags.ErrorPrefix.
Name of the method that emitted the log message.
Printed as:
MethodName():
Controlled by OutputFlags.Method.
The actual user-provided log message.
End-of-line character.
Controlled by OutputFlags.Eol.
logme — flexible runtime logging system
Home · Getting Started · Architecture · Output · Backends · Configuration
GitHub: https://github.com/efmsoft/logme