Version 1.1.0
[Summary]
StormByte Logger is the stream-logging module of the StormByte C++ suite.
It depends on StormByte Base 1.1.0 or newer. This repository is not Base, Buffer, Config, Crypto, Database, Multimedia, Network or System.
Public headers under StormByte/logger/ cover Log, ThreadedLog, header formats (%L %T %i %c %g), components, groups, ANSI colors, temporary formats, human-readable numbers and bytes, and redaction of text and numbers.
If you landed here from a release link and have not read the tree:
- What this module is, how to build it, and short examples: README.md
- License: GNU Lesser General Public License version 3 or later, LICENSE
Added
group("name")and%g; the group is cleared by newline and is not rendered in the body when%gis absent.- Sticky per-thread
component("name"),reset_componentand%c.component("")selects the root without throwing, whilereset_componentis the canonical reset. The state belongs to the thread, not theLog; twoLoginstances on one thread observe the same component. - ANSI colors by
Leveland component override, withcolor,color(Color::X)andnocolor. Color output is disabled by default. - Persistent general and component formats, plus nested
push_format/pop_format; an emptypop_formatis idempotent. - Expanded tests for colors, temporary formats, groups, components, threads, Unicode and lock recovery.
- Added configurable line throttle policies (
Drop,Sample,Window) with component/level/group rule precedence and drop summaries. - Added
FlushThrottle()and selectiveFlushThrottle(spec)for pending drop summaries at job boundaries.
Changed
- Requires StormByte Base 1.1.0 or newer (
ExceptionwithComponent). Logger did not use the two-stringExceptionconstructor. Warning,ErrorandFatalare always emitted, even when the configured floor is higher. This is intentional.- Expanded
ThreadedLogcoverage for the filtered hot path, wide conversion before locking, and recovery when Unicode conversion fails.
Fixed
ThreadedLog::FlushThrottlepreserves ownership of an already-held line lock.- Format changes now reset the active throttle line snapshot after closing an open line.
endlreleases theThreadedLogline lock even ifWillWrite()changes midway through a line.- Wide-string logging converts before acquiring the lock; a Unicode conversion error no longer terminates the logger from an internal
noexceptpath. - ThreadedLog::Write(Level) — two threads sharing a
ThreadedLograced onImplementation’soptional<Color>(m_content_color.reset()at the start of a line). The level token now takes the line lock like otherWriteoverloads; payload andendlalready did.