Skip to content
Eduard Mishkurov edited this page Apr 22, 2026 · 10 revisions

logme

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.

Configuration models

logme supports three complementary setup styles:

  1. Default configuration
    A default channel is created automatically with console output, and a debug backend is added in debug builds.

  2. Programmatic configuration
    Channels, links, backends, flags, and callbacks are created explicitly in code.

  3. 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.

Where to start

Platform support

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.

Clone this wiki locally