GLibLogWriter
A LogWriter implementation that uses GLib's g_log
for logging.
This integrates with GLib's logging system and supports GLib log levels.
Key Features
Automatically enables
DEBUG
andINFO
log levels if the minimum level is set belowMESSAGE
.Logs messages directly using
g_log
.Honors GLib's
G_MESSAGES_DEBUG
environment variable for enabling lower-level log messages.
Installation Convenience Methods
For convenience, companion methods allow adding this writer conditionally:
Use install to install for both debug and release builds.
Use installOnDebuggableApp for debug builds.
Use installOnReleaseApp for release builds.
Parameters
minLevel
The minimum log level to log. Default is LogLevel.DEBUG. Setting it below LogPriority.MESSAGE will enable DEBUG
and INFO
levels.