Category: Logging

This section explores logging in C and C++ from a practical, performance-oriented perspective. Instead of repeating common patterns, the focus is on what actually matters in real systems: cost of logging calls, formatting overhead, synchronization, buffering strategies, and I/O behavior.

You’ll find benchmarks, deep dives into implementation details, and comparisons of popular libraries, along with discussions of design trade-offs — including when asynchronous logging helps and when it becomes a bottleneck. The goal is to understand logging not as a utility, but as a critical part of system performance and observability.

Function Profiling with the logme Library

The logme library includes powerful built-in support for function profiling. One of its strongest advantages is how little effort it takes to start tracing function execution in detail. With logme, you can add a single macro to automatically log: function entry (including its name), function exit, optionally, input parameters, and the return value. This makes

Async Logging Is Not a Silver Bullet — What Actually Limits Performance

Why moving logging to another thread doesn’t make it cheaper — and where the cost really goes Async logging is often treated as an obvious optimization. It isn’t. It just moves the cost somewhere else. This idea sounds simple: synchronous logging blocks, async logging doesn’t — so it must be faster. But once you look

Logging channels in C++: spdlog vs logme

Support for channels in logging libraries is an important topic for C++ projects where it is necessary to separate, filter, and route messages from different subsystems. Support for channels in logging libraries directly affects how easy it is to analyze logs and how flexible the system is. Why support for channels in logging libraries matters

What Does LOG_INFO() Really Cost? A Benchmark of C++ Logging Libraries

We benchmarked several C++ logging libraries to understand C++ logging performance and answer a simple question: How much does a single logging call actually cost? Logging appears in almost every C++ project. Almost any service, daemon, or library eventually accumulates lines such as LOG_INFO(...) or logger.debug(...). Most of the time, a logging library is chosen based on habit, ecosystem,