About this project

Quill is an asynchronous logging and metrics library for C++17 and later, aimed at performance-critical and latency-sensitive applications. Its core design keeps formatting and I/O off the calling thread: log arguments are encoded on the frontend and processed by a dedicated backend worker, so expensive formatting happens away from hot paths. Key capabilities described in the README: - Asynchronous processing: a background thread handles formatting and I/O, keeping application threads responsive. - Metrics publishing: pre-registered metric samples can be sent through the same asynchronous backend. A bundled Prometheus sink handles counters, gauges, histograms and summaries, and custom sinks can route samples to StatsD, OpenTelemetry or other in-process collectors. - Minimal header footprint: the frontend needs only Logger.h and LogMacros.h, while the backend is included via a single .cpp file, avoiding backend code injection into other translation units. - Compile-time options: log levels can be eliminated at compile time, and frontend queues and memory policy can be tuned at compile time. - Runtime configuration: backend idle behaviour, CPU affinity, buffering, timestamp handling, flushing and callbacks can be configured, and loggers can be composed from built-in or custom sinks with per-sink filters. - Timestamps: support for rdtsc, chrono or custom clocks, with cross-thread timestamp comparison and a configurable grace window for delayed producers. - Sinks and output: console (with colour), files (with rotation), JSON, plus custom sinks. - Additional features: backtrace logging via a ring buffer, log filtering, JSON structured logging, mapped diagnostic context (MDC), rate-limited macros, configurable bounded/unbounded and blocking/dropping queue modes with monitoring, crash handling via a signal handler, huge pages support on Linux, wide character support on Windows, and an exception-free build option. - Type-safe API built on the {fmt} library. Installation is available through several package managers, including vcpkg, Conan, Homebrew, Meson WrapDB, Conda, Bzlmod, xmake, nix and build2. A quick-start path uses simple_logger() for console or file output, while a detailed setup exposes Backend and Frontend APIs for explicit control over sinks, loggers and formatters. A macro-free function API is also offered, described as slightly slower than the macro API. The README includes benchmark tables comparing Quill against other C++ logging libraries across scenarios such as logging numbers, large strings and complex types, with one and four threads. These results are presented with a specific system configuration and benchmark methodology, and should be read as the project's own measurements rather than independent verification.