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:
Georges Basile Stavracas Neto
2026-10-02 13:58:04 +00:00
committed by Marge Bot
parent b82f6bbcb8
commit c4c5c81cdf
+6
View File
@@ -121,10 +121,16 @@ gcal_log_init (void)
if (g_once_init_enter (&initialized))
{
const char *messages_debug = g_getenv ("G_MESSAGES_DEBUG");
standard_channel = g_io_channel_unix_new (STDOUT_FILENO);
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);
}
}