Logs a “critical warning” (
Critical warnings are intended to be used in the event of an error that originated in the current process (a programmer error). Logging of a critical error is by definition an indication of a bug somewhere in the current program (or its libraries).
g_return_val_if_reached() log at
You can make critical warnings fatal at runtime by
G_DEBUG environment variable (see
Running GLib Applications):
G_DEBUG=fatal-warnings gdb ./my-program
You can also use g_log_set_always_fatal().
Any unrelated failures can be skipped over in
gdb using the
The message should typically not be translated to the user’s language.
g_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, this will use g_log_structured(); otherwise it will use g_log(). See [Using Structured Logging][using-structured-logging].
Available since: 2.0
This function is not directly available to language bindings.