A fast, header-only C++ logging library with rich formatting and asynchronous support.
spdlog is a fast, feature-rich logging library for C++ applications. It provides both synchronous and asynchronous logging with support for multiple output targets, custom formatting, and runtime log level control. It solves the need for a high-performance, easy-to-integrate logging solution in modern C++ projects.
C++ developers building applications that require efficient, flexible logging, including system software, embedded systems, and high-performance services.
Developers choose spdlog for its exceptional speed, header-only simplicity, extensive feature set, and seamless integration with the fmt library for advanced formatting.
Fast C++ logging library.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks in the README show millions of logs per second in both synchronous and asynchronous modes, making it ideal for high-throughput applications like system software.
Integrates with the fmt library for type-safe, powerful formatting, as demonstrated in usage samples with custom specifiers for integers, floats, and binary data.
Supports console, files, syslog, Qt widgets, and custom sinks with easy extensibility, shown in multi-sink examples that allow different log levels and formats per target.
Optional asynchronous mode with configurable thread pools and overflow policies reduces blocking in main threads, though with trade-offs like MDC incompatibility.
Relies on the fmt library for formatting, which adds an extra dependency that must be managed and can complicate builds in environments with strict dependency controls.
Mapped Diagnostic Context (MDC) is not supported in asynchronous mode due to thread-local storage constraints, limiting advanced debugging features in high-performance scenarios.
Using the header-only version can significantly increase build times, as noted in the README's recommendation to use the compiled version for faster compiles.