Function
GLiblog_get_always_fatal
since: 2.86
Declaration [src]
GLogLevelFlags
g_log_get_always_fatal(
void
)
Description [src]
Gets the current fatal mask.
This is mostly used by custom log writers to make fatal messages
(fatal-warnings, fatal-criticals) work as expected, when using the
G_DEBUG environment variable (see Running GLib Applications).
An example usage is shown below:
staticGLogWriterOutput
my_custom_log_writer_fn(GLogLevelFlagslog_level,
constGLogField*fields,
gsizen_fields,
gpointeruser_data)
{
// abort if the message was fatal
if(log_level&g_log_get_always_fatal())
g_abort();
// custom log handling code
...
...
// success
returnG_LOG_WRITER_HANDLED;
}
Available since: 2.86
Return value
Type: GLogLevelFlags
The current fatal mask.