How kinnerfisch/klylogger works
KlyLogger is a C/C++ logging library whose main workflow accepts level-tagged messages, formats them, submits output work, and writes colored console and optional log-file output. It exposes both a C++ logger and an opaque-handle C API; the C header also provides C11 typed-argument convenience macros. The sampled implementation shows asynchronous task processing, callbacks, color-code handling, and file lifecycle behavior. Internal details are limited to the excerpts and SOURCE INDEX; unsampled C API and formatting internals are not expanded beyond documented behavior.
Main entry points: KlyLogger.cpp Output Worker · KlyLogger.hpp C++ Logger · KlyLogger.h C Interface · fmt fmt Formatting
Components 16
Public APIs
- C++ Logger
KlyLogger.hpp - C Interface
KlyLogger.h - C API Bridge
KlyLogger.cpp
Formatting
- Message Formatting
KlyLogger.hpp - fmt Formatting
fmt - C Typed Formatting
KlyLogger.cpp - String Conversion
KlyLogger.cpp
Logging Runtime
- Task Queue
KlyLogger.cpp - Output Worker
KlyLogger.cpp - Line Processing
KlyLogger.cpp - Log Callbacks
KlyLogger.cpp
Output
- Console Output
KlyLogger.cpp - Color Handling
KlyLogger.cpp - File Logging
KlyLogger.cpp - Log Files
KlyLogger.cpp
Other components
- Application
Connections 19
- Application → C++ Logger: logs through
README.md - Application → C Interface: logs through
README.md - C++ Logger → Message Formatting: formats messages
KlyLogger.hpp - Message Formatting → fmt Formatting: formats with
KlyLogger.hpp - Message Formatting → String Conversion: converts strings
KlyLogger.hpp - C++ Logger → Task Queue: submits tasks
KlyLogger.hpp - C Interface → C API Bridge: implemented by
KlyLogger.cpp - C Interface → C Typed Formatting: dispatches typed arguments
KlyLogger.h - C Typed Formatting → fmt Formatting: formats with
README.md - C API Bridge → Task Queue: submits log work
KlyLogger.cpp - Task Queue → Output Worker: dispatches tasks
KlyLogger.cpp - Output Worker → Line Processing: processes messages
KlyLogger.cpp - Output Worker → Log Callbacks: runs callbacks
KlyLogger.cpp - Output Worker → Console Output: outputs lines
KlyLogger.cpp - Line Processing → Color Handling: processes codes
KlyLogger.cpp - Color Handling → Console Output: sets terminal colors
KlyLogger.cpp - Console Output → File Logging: writes line breaks
KlyLogger.cpp - File Logging → Log Files: writes and rotates
KlyLogger.cpp - File Logging → String Conversion: converts wide text
KlyLogger.cpp