shell: Do not forcibly suppress debug messages if --verbose not set

Only force G_MESSAGES_DEBUG=all on --verbose, and follow the usual
logging behaviour otherwise.

This fixes specifying log domains in G_MESSAGES_DEBUG and also
G_MESSAGES_DEBUG=all without setting --verbose.

https://bugzilla.gnome.org/show_bug.cgi?id=693732
This commit is contained in:
Emanuele Aina 2013-02-13 13:57:38 +01:00
parent f064b653df
commit 30144e58f3

View file

@ -54,12 +54,10 @@ cc_shell_log_init (void)
void
cc_shell_log_set_debug (gboolean debug)
{
g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
if (debug) {
g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
log_levels |= (G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO);
g_debug ("Enabling debugging");
} else {
log_levels &= ~ (G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO);
}
}