log


Description:

[ Diagnostics ]
[ PrintfFormat ]
public void log (string? log_domain, LogLevelFlags log_level, string format, ...)

Logs an error or debugging message.

If the log level has been set as fatal, [func@GLib.BREAKPOINT] is called to terminate the program. See the documentation for [ func@GLib.BREAKPOINT] for details of the debugging options this provides.

If [func@GLib.log_default_handler] is used as the log handler function, a new-line character will automatically be appended to ... , and need not be entered manually.

If [structured logging is enabled](logging.html#using-structured-logging) this will output via the structured log writer function (see [ func@GLib.log_set_writer_func]).

Parameters:

log_domain

the log domain, usually `G_LOG_DOMAIN`, or `NULL` for the default

log_level

the log level, either from [type@GLib.LogLevelFlags] or a user-defined level

format

the message format. See the `printf()` documentation

...

the parameters to insert into the format string


Namespace: GLib
Package: glib-2.0