How sayujya-apte/asynclog works
AsyncLog is a C++ asynchronous logging library. An application configures a Logger, submits level-filtered messages (optionally formatted), and a worker consumes queued messages and writes to enabled console and file sinks. The source shows queue synchronization, timestamp/level formatting, and ANSI removal for file output; custom logger inheritance is documented. The repository is small, so the graph focuses on runtime behavior rather than build machinery.
Main entry points: Logger.h Logger · Logger.cpp Logging worker · Core.h Levels and colors · LogQueue.cpp Thread-safe queue
Components 9
Logging API
- Logger
AsyncLog/Logger.h - Message formatting
AsyncLog/Logger.cpp - Levels and colors
AsyncLog/Core.h
Async processing
- Thread-safe queue
AsyncLog/LogQueue.cpp - Logging worker
AsyncLog/Logger.cpp
Output sinks
- File output
AsyncLog/Logger.cpp - Console output
AsyncLog/Logger.cpp
Other components
- Application
- System clock
Connections 9
- Application → Logger: configures and calls
- Logger → Levels and colors: filters by
- Logger → Message formatting: formats message
- Message formatting → System clock: gets timestamp
- Message formatting → Levels and colors: uses labels and colors
- Logger → Thread-safe queue: enqueues
- Logging worker → Thread-safe queue: dequeues
- Logging worker → File output: writes stripped text
- Logging worker → Console output: writes colored text