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 print it to either
stdoutorstderr, depending on its log level.GLib.LogLevelFlags.LEVEL_INFO and GLib.LogLevelFlags.LEVEL_DEBUG messages are sent to
stdout, or tostderrif requested by GLib.log_writer_default_set_use_stderr; all other log levels are sent tostderr. Only fields which are understood by this function are included in the formatted string which is printed.If the output stream supports ANSI color escape sequences, they will be used in the output.
A trailing new-line character is added to the log message when it is printed.
This is suitable for use as a GLib.LogWriterFunc.