On this page
Overview
spdlog is a fast C++ logging library that can be used header-only or as a compiled library. It combines console and file sinks, asynchronous logging, runtime and compile-time levels, fmt-based formatting, and backtrace support.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Choose between header-only and compiled-library integration
The README documents copying the include tree for header-only use and building the library with CMake for the compiled mode, which it recommends for faster application compile times.
Route logs to console, rotating or daily files, syslog, and custom sinks
Built-in targets include colored consoles, basic/rotating/daily files, syslog, Windows event log, Qt widgets, and extension points for custom sinks.
Sources: [1]
Combine async logging, level filtering, and backtrace buffering
spdlog provides optional asynchronous mode, runtime and compile-time log levels, argv/environment configuration, and a ring-buffer backtrace that can be dumped when an error occurs.
Sources: [1]
Best fit
Fits C++ applications standardizing logging behind one lightweight API
It is useful for server, desktop, and embedded-oriented C++ code that wants formatting and multiple output sinks while retaining a choice between header-only and compiled integration.
Sources: [1]
Before adoption
The default build is C++11 while std::format mode requires C++20
The CMake configuration requires C++11 by default and switches to C++20 when SPDLOG_USE_STD_FORMAT is enabled, so toolchain standard settings must match the selected formatting backend.
Sources: [3]
Official sources
- [1]spdlog v1.17.0 README(2026-10-04)
- [2]spdlog v1.17.0 release(2026-10-04)
- [3]spdlog v1.17.0 CMake configuration(2026-10-04)
- [4]spdlog MIT license(2026-10-04)
Supplemental curator note
GitHub reports NOASSERTION for the repository license, but the upstream LICENSE explicitly licenses spdlog under MIT and notes the bundled fmt dependency is also MIT. Version 1.17.0 updates bundled fmt to 12.1.0.
Try it in 3 steps
- 1
Fetch spdlog v1.17.0
Pin the source checkout to the reviewed stable release.
git clone --depth 1 --branch v1.17.0 https://github.com/gabime/spdlog.git spdlog-1.17 - 2
Build the compiled library with CMake
Build a minimal compiled configuration, which the README recommends for faster consumer compile times.
cmake -S spdlog-1.17 -B spdlog-1.17/build -DSPDLOG_BUILD_EXAMPLE=OFF -DSPDLOG_BUILD_TESTS=OFF && cmake --build spdlog-1.17/build -j2 - 3
Compile and run a header-only logging sample
Validate the C++11 header-only path without installing spdlog system-wide.
printf '#include <spdlog/spdlog.h>\nint main(){ spdlog::info("spdlog {}", 17); }\n' > spdlog-demo.cpp && c++ -std=c++11 -Ispdlog-1.17/include spdlog-demo.cpp -pthread -o spdlog-demo && ./spdlog-demo
Growth
Growth trends · Last 30 days
29,652 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 12
- Open PRs
- 14
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- header-only
- cpp11
- cpp
- logging
- spdlog
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Arduino-ESP3217,463 Stars
1 shared tag(s) · 1 shared category(s) · Same language
develop for the ESP32 SoC family with the official Arduino core, libraries, board definitions, and integrated Espressif toolchains
C++ - Assimp13,242 Stars
1 shared tag(s) · 1 shared category(s) · Same language
load 40+ 3D formats into a shared scene structure and integrate conversion and post-processing into asset pipelines
C++ - Google Benchmark10,449 Stars
1 shared tag(s) · 1 shared category(s) · Same language
write C++ microbenchmarks with a unit-test-like API and measure timing, iterations, counters, and statistics
C++ - BoringSSL2,280 Stars
1 shared tag(s) · 1 shared category(s) · Same language
use Google's OpenSSL fork for TLS and cryptography in projects that explicitly track BoringSSL
C++ - Adaptive AUTOSAR Simulator496 Stars
1 shared tag(s) · 1 shared category(s) · Same language
Study AUTOSAR Adaptive interfaces through an educational Linux C++ simulator
C++ - ArduinoCore-API307 Stars
1 shared tag(s) · 1 shared category(s) · Same language
the shared hardware-independent C++ API contract used by Arduino platform cores
C++
Report incorrect information
Tell us if any listing information is incorrect or outdated.