Log
Log acts as a global, thread-safe manager for log writers.
By default, no writers are installed, so no logs will appear. To enable logging, add one or more LogWriters using install. All logging calls will be delegated to the installed writers.
You can remove a writer using uninstall, and multiple writers can be active at the same time.
This approach solves:
Having multiple loggers: Just install multiple writers.
No duplication of installation logic: Add or remove writers through Log.
Easy extensibility: Implement your own LogWriter to customize messages or formatting.
Properties
A user-configurable default domain for logs. If set, any log
call with domain = null
will use this value instead of deriving it from the caller.
Determines the default minimum level for release builds based on whether GLib's debug logging is enabled.
Functions
Installs this writer for both debug and release builds.
Installs this writer for debug builds if the application is debuggable.
Installs this writer for release builds if the application is not debuggable.
Installs this writer for both debug and release builds.
Installs this writer for debug builds if the application is debuggable.
Installs this writer for release builds if the application is not debuggable.
Checks if GLib debug logging is enabled.
Uninstalls all currently installed writers.