Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. C/C++
  3. spdlog

spdlog

NOASSERTIONC++v1.17.0

A fast, header-only C++ logging library with rich formatting and asynchronous support.

GitHubGitHub
29.2k stars5.3k forks0 contributors

What is spdlog?

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.

Target Audience

C++ developers building applications that require efficient, flexible logging, including system software, embedded systems, and high-performance services.

Value Proposition

Developers choose spdlog for its exceptional speed, header-only simplicity, extensive feature set, and seamless integration with the fmt library for advanced formatting.

Overview

Fast C++ logging library.

Use Cases

Best For

  • High-performance C++ applications requiring minimal logging overhead
  • Systems needing asynchronous logging to avoid blocking main threads
  • Projects requiring custom log sinks (e.g., Qt widgets, syslog, rotating files)
  • Debugging complex applications with backtrace and runtime log level control
  • Cross-platform C++ development with consistent logging across OSes
  • Embedded or resource-constrained environments where header-only usage is preferred

Not Ideal For

  • Projects requiring zero external dependencies and using only the C++ standard library
  • Legacy codebases with C++ compilers older than C++11
  • Microcontroller environments where every kilobyte of flash memory is critical
  • Applications needing seamless multi-language logging without custom integration layers

Pros & Cons

Pros

Extreme Performance

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.

Rich Formatting with fmt

Integrates with the fmt library for type-safe, powerful formatting, as demonstrated in usage samples with custom specifiers for integers, floats, and binary data.

Flexible Sink System

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.

Asynchronous Logging

Optional asynchronous mode with configurable thread pools and overflow policies reduces blocking in main threads, though with trade-offs like MDC incompatibility.

Cons

External Dependency on fmt

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.

Asynchronous Mode Limitations

Mapped Diagnostic Context (MDC) is not supported in asynchronous mode due to thread-local storage constraints, limiting advanced debugging features in high-performance scenarios.

Compilation Overhead in Header-Only Mode

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.

Frequently Asked Questions

Quick Stats

Stars29,241
Forks5,261
Contributors0
Open Issues40
Last commit12 days ago
CreatedSince 2014

Tags

#syslog#fmt#asynchronous#c-plus-plus#multithreading#logging#cross-platform#debugging#cpp11#cpp#header-only#performance

Built With

f
fmt
C
C++

Included in

C/C++70.6kRobotic Tooling3.8kGame Engine Development1.3k
Auto-fetched 3 hours ago

Related Projects

imguiimgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies

Stars74,986
Forks11,931
Last commit13 hours ago
C/C++C/C++

A curated list of awesome C++ (or C) frameworks, libraries, resources, and shiny things. Inspired by awesome-... stuff.

Stars72,398
Forks8,320
Last commit5 days ago
ProtoBufProtoBuf

Protocol Buffers - Google's data interchange format

Stars71,621
Forks16,200
Last commit1 hour ago
JSON for Modern C++JSON for Modern C++

JSON for Modern C++

Stars50,198
Forks7,437
Last commit10 hours ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub