finds.dev← search

// the find

emilk/loguru

★ 1,912 · C++ · Unlicense · updated Sep 2026

A lightweight C++ logging library

Loguru is a two-file, header-only C++ logging library positioned as a lighter, faster-compiling alternative to glog, with printf-style logging by default and optional std::ostream/fmtlib support. It's aimed at C++ projects (games, tools, services) that want glog-like features - verbosity levels, assertions, multi-file sinks - without pulling glog's dependencies and compile-time cost into every translation unit.

The integration footprint is genuinely small and the compile-time claim is backed by a number: the README cites ~10% faster builds versus glog/logging.hpp on a real project, which matters when a logging header gets included everywhere. Crash diagnostics go beyond just catching the error - stack traces are demangled and printed in correct chronological order (not raw reversed backtraces), and ERROR_CONTEXT lets you stash local variable values that only get written to the log if a crash actually happens, so you're not paying for verbose context on the happy path. It also doesn't force one logging style on you: printf-style with compile-time format checking is the default, but LOGURU_WITH_STREAMS gives operator<< logging and LOGURU_USE_FMTLIB wires in fmtlib, useful if you're migrating off glog's streaming API.

There's no structured output - every sink writes the same fixed plain-text line (timestamp, thread, file:line, level), so feeding something like an ELK stack or Loki means writing your own line parser rather than getting JSON out of the box. File handling is minimal: only Truncate or Append, no size- or date-based rotation, so a long-running service on Append will grow its log file forever unless you bolt on logrotate yourself. The public-domain/Unlicense dual license is unusual for a C++ dependency and can stall adoption at companies whose legal review process has a pre-approved lane for MIT/Apache-2.0 but not for 'public domain'.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →