-
Notifications
You must be signed in to change notification settings - Fork 2
Home
logme is a configurable C++ logging library with named channels, multiple backend types, runtime control, JSON configuration, and an asynchronous file output path.
It can be used as a very small logger, but the implementation also supports a larger operational model:
- channels and linked routing graphs
- per-channel formatting via
OutputFlags - subsystem filtering
- JSON-based topology setup
- runtime inspection and limited live reconfiguration via a control server
- optional file-output obfuscation
- thread-local channel / override context
- buffered, batched file writing
A few design points are worth calling out explicitly:
- “zero cost” primarily refers to builds where logging is compiled out
- some disabled calls can also short-circuit early at runtime through the precheck path
- file output is not just
fprintf; it uses an internal queue and worker-driven batching
For the logging API itself, see Logging Macros.
logme supports three complementary setup styles:
-
Default configuration
A default channel is created automatically with console output, and a debug backend is added in debug builds. -
Programmatic configuration
Channels, links, backends, flags, and callbacks are created explicitly in code. -
JSON-based configuration
The channel graph, subsystem policy, watchdog, and control server are loaded from JSON and replace the live configured channels.
These approaches can coexist, but JSON loading should be thought of as an authoritative configuration step rather than a tiny incremental patch.
The project contains platform-specific handling for Windows and POSIX-like systems, and the wiki/documentation targets:
- Windows
- Linux
- macOS
Console highlighting depends on terminal capabilities. On Windows, VT behavior may need to be enabled for ANSI color sequences.
logme — flexible runtime logging system
Home · Getting Started · Architecture · Output · Backends · Configuration
GitHub: https://github.com/efmsoft/logme