Sonic Logging
The SonicDE message handler and logging API.
Sonic Logging is the logging library for SonicDE. It installs a Qt message handler that gives every executable its own log file, sends messages to journald where it runs, and gives SonicDE code a small logging API. Logs stay usable without systemd.
- Sonic::Logging: install() sets up the handler for a program.
- SONIC_LOGGING_COMPONENT(): declares a binary's component, which sonicDebug(), sonicInfo(), sonicWarning(), sonicCritical() and sonicFatal() log under.
Using the Module
Building with CMake
Use the find_package() command to locate the SonicLogging package and link against its target:
find_package(SonicLogging REQUIRED)
target_link_libraries(mytarget PRIVATE Sonic::Logging)