The default log handler set up by GLib; GLib.log_set_default_handler
allows to install an alternate default log handler.
This is used if no log handler has been set for the particular log
domain and log level combination. It outputs the message to stderr
or stdout and if the log level is fatal it calls GLib.BREAKPOINT. It automatically
prints a new-line character after the message, so one does not need to be
manually included in message.
The behavior of this log handler can be influenced by a number of
environment variables:
G_MESSAGES_PREFIXED: A :-separated list of log levels for which
messages should be prefixed by the program name and PID of the
application.
G_MESSAGES_DEBUG: A space-separated list of log domains for
which debug and informational messages are printed. By default
these messages are not printed. If you need to set the allowed
domains at runtime, use GLib.log_writer_default_set_debug_domains.
DEBUG_INVOCATION: If set to 1, this is equivalent to
G_MESSAGES_DEBUG=all. DEBUG_INVOCATION is a standard environment
variable set by systemd to prompt debug output. (Since: 2.84)
The default log handler set up by GLib; GLib.log_set_default_handler allows to install an alternate default log handler.
This is used if no log handler has been set for the particular log domain and log level combination. It outputs the message to
stderrorstdoutand if the log level is fatal it calls GLib.BREAKPOINT. It automatically prints a new-line character after the message, so one does not need to be manually included inmessage.The behavior of this log handler can be influenced by a number of environment variables:
G_MESSAGES_PREFIXED: A:-separated list of log levels for which messages should be prefixed by the program name and PID of the application.G_MESSAGES_DEBUG: A space-separated list of log domains for which debug and informational messages are printed. By default these messages are not printed. If you need to set the allowed domains at runtime, use GLib.log_writer_default_set_debug_domains.DEBUG_INVOCATION: If set to1, this is equivalent toG_MESSAGES_DEBUG=all.DEBUG_INVOCATIONis a standard environment variable set by systemd to prompt debug output. (Since: 2.84)stderris used for levels GLib.LogLevelFlags.LEVEL_ERROR, GLib.LogLevelFlags.LEVEL_CRITICAL, GLib.LogLevelFlags.LEVEL_WARNING and GLib.LogLevelFlags.LEVEL_MESSAGE.stdoutis used for the rest, unlessstderrwas requested by GLib.log_writer_default_set_use_stderr.This has no effect if structured logging is enabled; see Using Structured Logging.