core/log: Enable tracing with G_MESSAGES_DEBUG=all
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/858>
This commit is contained in:
committed by
Marge Bot
parent
b82f6bbcb8
commit
c4c5c81cdf
@@ -121,10 +121,16 @@ gcal_log_init (void)
|
|||||||
|
|
||||||
if (g_once_init_enter (&initialized))
|
if (g_once_init_enter (&initialized))
|
||||||
{
|
{
|
||||||
|
const char *messages_debug = g_getenv ("G_MESSAGES_DEBUG");
|
||||||
|
|
||||||
standard_channel = g_io_channel_unix_new (STDOUT_FILENO);
|
standard_channel = g_io_channel_unix_new (STDOUT_FILENO);
|
||||||
|
|
||||||
g_log_set_default_handler (gcal_log_handler, NULL);
|
g_log_set_default_handler (gcal_log_handler, NULL);
|
||||||
|
|
||||||
|
/* Assume tracing if G_MESSAGES_DEBUG=all */
|
||||||
|
if (g_strcmp0 (messages_debug, "all") == 0)
|
||||||
|
log_verbosity = 4;
|
||||||
|
|
||||||
g_once_init_leave (&initialized, TRUE);
|
g_once_init_leave (&initialized, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user