spdlog is a fast C++ logging library designed for high-performance applications requiring efficient message output and diagnostics. Written in C++, the library is classified by GitGenius as a high-performance, thread-safe logging solution with support for asynchronous operations, multiple log sinks, and customizable message formatting.
The library offers two deployment models: a header-only version that requires only C++11 compiler support and copying the include folder into a build tree, and a compiled version that provides faster compilation times and is recommended for production use. This flexibility allows developers to choose between ease of integration and build performance based on their project requirements. spdlog supports an extensive range of platforms including Linux variants, FreeBSD, OpenBSD, Solaris, AIX, Windows with MSVC 2013 and later, Cygwin, macOS with Clang 3.5 and later, and Android.
The library's feature set encompasses very fast synchronous and asynchronous logging modes, with the asynchronous mode providing optional non-blocking operation for performance-critical applications. spdlog integrates with the fmt library for feature-rich formatting capabilities and supports custom formatting patterns. It provides multiple threading models including multi-threaded and single-threaded loggers, with runtime and compile-time log level configuration. The library includes numerous built-in log targets such as rotating log files, daily log files, console logging with color support, syslog, Windows event log, Windows debugger output, and Qt widget integration. Developers can extend spdlog with custom log targets through its extensible sink architecture.
Advanced features include backtrace support for storing debug messages in a ring buffer for later inspection, log filtering with dynamic level modification, environment variable and command-line argument support for log level configuration, periodic flush operations, stopwatch functionality, binary data logging in hexadecimal format, and user-defined callbacks for log events. The library supports multi-sink loggers with different formats and levels per sink, mapped diagnostic context, and custom error handlers.
Package manager availability is extensive, with spdlog packaged in Debian, Homebrew, MacPorts, FreeBSD, Fedora, Gentoo, Arch Linux, openSUSE, ALT Linux, vcpkg, conan, conda, and build2 ecosystems, making integration straightforward across diverse development environments. The repository maintains connections with other significant projects including llvm/llvm-project, ray-project/kuberay, and mesonbuild/meson through overlapping contributor networks, indicating its importance within the broader C++ development ecosystem.