About this project
StormByte Logger is a C++26 logging library designed as part of the StormByte suite. It provides a stream-based logging interface with support for multiple log levels (LowLevel, Debug, Warning, Notice, Info, Error, Fatal). The library allows customizable log headers using format specifiers for level (%L), timestamp (%T), thread ID (%i), and literal % (%%).
It includes manipulators for human-readable number formatting (humanreadable_number, humanreadable_bytes) and redaction (redact, redact_first, no_redact). Redaction applies to both text and numbers, with options to keep the first or last N characters. The state of these manipulators persists until changed.
The library offers two main logging classes: Log (single-threaded) and ThreadedLog (thread-safe, using one lock per logical line and avoiding locks for messages below the print level). Note: plain Log is not thread-safe; ThreadedLog must be used for multi-threaded environments. Requires StormByte Base and a C++26 compiler.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.