log level, either from GLib.LogLevelFlags, or a user-defined level
key–value pairs of structured data forming the log message
Optionaluser_data: anyuser data passed to GLib.log_set_writer_func
GLib.LogWriterOutput.HANDLED on success, GLib.LogWriterOutput.UNHANDLED otherwise
Format a structured log message and output it to the default log destination for the platform.
On Linux, this is typically the systemd journal, falling back to
stdoutorstderrif running from the terminal or if output is being redirected to a file.Support for other platform-specific logging mechanisms may be added in future. Distributors of GLib may modify this function to impose their own (documented) platform-specific log writing policies.
This is suitable for use as a GLib.LogWriterFunc, and is the default writer used if no other is set using GLib.log_set_writer_func.
As with GLib.log_default_handler, this function drops debug and informational messages unless their log domain (or
all) is listed in the space-separatedG_MESSAGES_DEBUGenvironment variable, orDEBUG_INVOCATION=1is set in the environment, or set at runtime by GLib.log_writer_default_set_debug_domains.GLib.log_writer_default uses the mask set by GLib.log_set_always_fatal to determine which messages are fatal. When using a custom writer function instead it is up to the writer function to determine which log messages are fatal.