Skip to content
Hugo edited this page Sep 30, 2026 · 2 revisions

coretrace-log

A small, thread-safe C++20 logging library with colored terminal output. The CMake package is coretrace-logger and the target is coretrace::logger.

  • std::format messages, level and module filtering, timestamps, source locations
  • Custom sinks: one call per line, callbacks may log themselves
  • Linux, macOS and Windows; no dependency besides the standard library and threads
#include <coretrace/logger.hpp>

int main() {
  coretrace::enable_logging();
  coretrace::log(coretrace::Level::Info, "Hello {}\n", "world");
}
|12345| ==ct== [INFO] Hello world

Pages

Page Contents
Getting Started Requirements, CMake integration, build options
Configuration Levels, modules, prefix, timestamps, source locations, colors, environment variables
Sinks and Threading Custom sinks, thread-safe mode, lifetime and reentrancy guarantees
Output Format Anatomy of a log line
API Reference Every public type and function
Architecture Source layout, initialization, output path, platform backends
Testing Test suite, sanitizers, coverage
Contributing Development setup, conventions, CI workflows
Releasing Versioning and release steps

Releases and their notes are on the releases page.

Clone this wiki locally