Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

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

lwlog

MITC++v1.5.0

A high-performance C++17 logging library with zero dynamic allocations during log calls, supporting synchronous and asynchronous logging.

GitHubGitHub
350 stars31 forks0 contributors

What is lwlog?

lwlog is a high-performance, header-only logging library for C++17 that provides both synchronous and asynchronous logging with zero dynamic memory allocations during log calls. It solves the problem of logging overhead in performance-critical applications by using pre-allocated static buffers and offering extensive configurability through policy-based design.

Target Audience

C++ developers working on performance-sensitive applications, such as game engines, real-time systems, embedded software, or high-throughput services, who need low-latency, customizable logging.

Value Proposition

Developers choose lwlog for its benchmark-proven speed advantage over alternatives, its zero-allocation design that eliminates heap fragmentation, and its flexible, policy-driven architecture that allows fine-grained control over logging behavior without sacrificing ease of use.

Overview

Very fast synchronous and asynchronous C++17 logging library

Use Cases

Best For

  • High-frequency logging in real-time applications
  • Embedded systems with strict memory constraints
  • Game engines requiring minimal logging overhead
  • Server applications needing asynchronous log processing
  • Cross-platform C++ projects with multi-compiler support
  • Projects requiring custom log sinks and formatting

Not Ideal For

  • Projects targeting C++14 or older standards, as lwlog requires C++17.
  • Teams seeking a logging library with minimal configuration and no template metaprogramming, due to its policy-based design.
  • Applications where logging patterns must be dynamically changed at runtime, since lwlog compiles patterns once at setup.
  • Environments where the risk of data loss from buffered flushing is unacceptable, as the buffered flush policy trades safety for speed.

Pros & Cons

Pros

Zero Allocation Performance

Uses pre-allocated static buffers to eliminate dynamic memory allocations during log calls, reducing fragmentation and improving speed in high-frequency scenarios, as highlighted in the design philosophy.

Benchmark-Proven Speed

Demonstrates significant performance advantages over spdlog in both synchronous and asynchronous modes, with detailed benchmarks showing up to 10x faster operations in some cases.

Extensible Sink System

Easy to add custom sinks by inheriting from the base sink class and implementing sink_it(), with clear examples provided for stdout_sink and custom sinks.

Policy-Based Configuration

Offers fine-grained control through template policies for threading, flushing, and overflow behavior, enabling tailored logging setups without runtime overhead.

Cons

Complex Setup for Newcomers

Requires understanding of multiple template parameters and policies, making initial configuration more involved compared to simpler, macro-based logging libraries.

Limited Runtime Flexibility

Patterns are compiled once at setup, hindering dynamic changes, and static buffer sizes are fixed at compile-time, which can lead to wasted memory or truncation if misconfigured.

Potential Data Loss in Buffered Mode

The buffered flush policy improves performance but risks losing log messages if the application crashes before the buffer is flushed, as admitted in the README's policy descriptions.

Compiler Dependency for Metadata

Source metainformation features rely on compiler-specific intrinsics and may not work on older versions, such as Visual Studio pre-1927, limiting portability without C++20's std::source_location.

Frequently Asked Questions

Quick Stats

Stars350
Forks31
Contributors0
Open Issues5
Last commit28 days ago
CreatedSince 2019

Tags

#asynchronous-logging#metaprogramming#library#high-performance#embedded#cplusplus-17#cpp17#logging-library#low-latency#logging#logger#cplusplus#cross-platform#zero-allocation#cpp17-library#real-time#cpp#header-only

Built With

C
CMake
C
C++17

Included in

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

Related Projects

spdlogspdlog

Fast C++ logging library.

Stars29,241
Forks5,261
Last commit12 days ago
glogglog

C++ implementation of the Google logging module

Stars7,369
Forks2,150
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,941
Forks943
Last commit1 year ago
QuillQuill

Asynchronous Low Latency C++ Logging Library

Stars2,976
Forks267
Last commit8 days 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