[gnome-control-center] shell: Do not forcibly suppress debug messages if --verbose not set



commit 30144e58f3a7ec0e918a3dc204afec79478ad9b9
Author: Emanuele Aina <emanuele aina collabora com>
Date:   Wed Feb 13 13:57:38 2013 +0100

    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

 shell/cc-shell-log.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/shell/cc-shell-log.c b/shell/cc-shell-log.c
index b5ebc23..625cdd7 100644
--- a/shell/cc-shell-log.c
+++ b/shell/cc-shell-log.c
@@ -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);
         }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]