Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

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

fmtlog

MITC++v2.3.0

A high-performance asynchronous C++ logging library using fmtlib formatting with nanosecond latency.

GitHubGitHub
1.0k stars157 forks0 contributors

What is fmtlog?

fmtlog is a high-performance asynchronous logging library for C++ that uses fmtlib-style formatting. It solves the need for extremely fast logging in latency-sensitive applications by providing nanosecond-scale front-end operations while maintaining rich, type-safe log formatting.

Target Audience

C++ developers building performance-critical applications such as high-frequency trading systems, game engines, or real-time services where logging overhead must be minimized.

Value Proposition

Developers choose fmtlog for its unique combination of fmtlib's expressive formatting, lower latency than NanoLog, higher throughput than spdlog, and fine-grained control over threading and buffering without hidden background threads.

Overview

fmtlog is a performant fmtlib-style logging library with latency in nanoseconds.

Use Cases

Best For

  • High-frequency trading systems requiring nanosecond-precision logging
  • Real-time game engines where logging overhead impacts frame rates
  • Low-latency server applications that cannot tolerate logging delays
  • Embedded systems or performance-sensitive C++ projects needing header-only logging
  • Applications requiring rich, type-safe log formatting with custom types
  • Multi-threaded services that need guaranteed chronological log ordering

Not Ideal For

  • Applications requiring synchronous, immediate log output without any polling or background thread management
  • Projects with strict memory budgets where ~50 bytes per log statement code bloat is prohibitive
  • Teams needing built-in log rotation, color output, or syslog integration without custom code
  • Environments using compilers or platforms not explicitly supported (e.g., macOS or older C++ standards)

Pros & Cons

Pros

Nanosecond-Scale Latency

Benchmarks show front-end operations in single-digit nanoseconds, outperforming NanoLog and spdlog for most message types, as detailed in the performance section.

Rich fmtlib Formatting

Leverages fmtlib for type-safe format strings, supporting custom types, ranges, tuples, and user-defined formatters, enabling expressive log messages.

Flexible Threading Control

Allows explicit polling via fmtlog::poll() or background thread creation, giving developers full control over logging thread management for predictable behavior.

Guaranteed Chronological Order

Asynchronous multi-threaded logging ensures logs are output in time order, critical for debugging concurrent applications without race conditions.

Cons

Explicit Polling Overhead

Requires manual calls to fmtlog::poll() or background thread setup, adding complexity and potential points of failure in application code.

Code Size Bloat

Each log statement adds approximately 50 bytes for decoding functions, significantly increasing binary size in log-heavy applications, as admitted in the README.

Limited Built-in Features

Lacks native support for color output, log rotation, or syslog, requiring custom implementations via callbacks or external handling.

Frequently Asked Questions

Quick Stats

Stars1,026
Forks157
Contributors0
Open Issues31
Last commit1 year ago
CreatedSince 2021

Tags

#high-performance#multi-threading#logging-library#asynchronous#low-latency#c-plus-plus#logging#c-plus-plus-17#header-only

Built With

C
CMake
C
C++17
f
fmtlib

Included in

C/C++70.6k
Auto-fetched 8 hours ago

Related Projects

spdlogspdlog

Fast C++ logging library.

Stars29,586
Forks5,404
Last commit3 days ago
glogglog

C++ implementation of the Google logging module

Stars7,395
Forks2,247
Last commit1 year ago
Easylogging++Easylogging++

C++ logging library. It is powerful, supports asynchronous low latency, extendable, light-weight, fast performing, thread and type safe and consists of many built-in features. It provides ability to write logs in your own customized format. It also provide support for logging your classes, third-party libraries, STL and third-party containers etc.

Stars3,938
Forks944
Last commit1 year ago
QuillQuill

Ultra-low-latency asynchronous C++17 logging and metrics library for performance-critical applications

Stars3,025
Forks273
Last commit12 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