OSS TanbouSign in with GitHub

use a fast C++ logging library with header-only or compiled builds, multiple sinks, formatting, and async logging

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
29,652
Primary language
C++
License
MIT
Repository last updated
Oct 2, 2026
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.

Sources: [1][3]

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]

v1.17.0 updates bundled fmt to 12.1.0 and fixes timezone formatting

Version 1.17.0 bumps the bundled {fmt} library to 12.1.0 and fixes %z timezone-offset behavior on Windows, FreeBSD, and UTC. The LICENSE also notes that both spdlog and its fmt dependency use the MIT license.

Sources: [2][4]

Official sources

  1. [1]spdlog v1.17.0 README(2026-10-04)
  2. [2]spdlog v1.17.0 release(2026-10-04)
  3. [3]spdlog v1.17.0 CMake configuration(2026-10-04)
  4. [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. 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. 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. 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
Check the official README

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
Stars
29,652
Forks
5,385
Watchers
475
Open issues
38
Contributors
399
Owner type
User
Primary language
C++
License
MIT
Repository last updated
Oct 2, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?