As with GLib.log_default_handler, this function drops debug and informational
messages unless their log domain (or all) is listed in the space-separated
G_MESSAGES_DEBUG environment variable, or DEBUG_INVOCATION=1 is set in
the environment, or by GLib.log_writer_default_set_debug_domains.
This can be used when implementing log writers with the same filtering
behaviour as the default, but a different destination or output format:
if (g_log_writer_default_would_drop (log_level, log_domain)) return G_LOG_WRITER_HANDLED;
or to skip an expensive computation if it is only needed for a debugging
message, and G_MESSAGES_DEBUG and DEBUG_INVOCATION are not set:
Check whether GLib.log_writer_default and GLib.log_default_handler would ignore a message with the given domain and level.
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 by GLib.log_writer_default_set_debug_domains.This can be used when implementing log writers with the same filtering behaviour as the default, but a different destination or output format:
or to skip an expensive computation if it is only needed for a debugging message, and
G_MESSAGES_DEBUGandDEBUG_INVOCATIONare not set: