Zylog
The Zylog class is the engine of the library. It manages configuration state, high-resolution timers, and the internal file stream registry.
Architectural Overview
Section titled âArchitectural OverviewâZylog uses a Level-Based Filtering architecture. Every log call is checked against the current level priority before any formatting or write operations occur. This ensures that debug or trace calls have negligible performance impact when the logger is set to info mode.
Configuration
Section titled âConfigurationâControl how the logger behaves globally.
config Global instance settings.
level Minimum severity filter.
silent Global output toggle.
isLevelEnabled Runtime level check.
Logging Interface
Section titled âLogging InterfaceâChoose the right severity for your message.
Stream Management
Section titled âStream ManagementâManage file write streams and log persistence.
streams List active file paths.
createStream Initialize file logging.
closeStream Safe shutdown of files.
Utilities & Context
Section titled âUtilities & ContextâAdvanced instrumentation and context handling.
with Contextual chaining.
measure Auto-timer wrapper.
time Manual start timer.
timeEnd Manual stop/log timer.
Visuals
Section titled âVisualsâ enableColors Set ANSI support level.
disableColors Strip all ANSI codes.