[gnome-shell] shell: disable libgnome-bluetooth debug spew



commit 4e45e28ea01d84a579cb6ed85adaf2769cdeef90
Author: Dan Winship <danw gnome org>
Date:   Tue Jan 11 12:27:10 2011 -0500

    shell: disable libgnome-bluetooth debug spew
    
    Centralize all the debug-spew-disabling here, and add
    libgnome-bluetooth to the list.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=639236

 src/gdmuser/gdm-user-manager.c |   14 --------------
 src/gnome-shell-plugin.c       |   16 ++++++++++------
 2 files changed, 10 insertions(+), 20 deletions(-)
---
diff --git a/src/gdmuser/gdm-user-manager.c b/src/gdmuser/gdm-user-manager.c
index d3df15a..a39bea1 100644
--- a/src/gdmuser/gdm-user-manager.c
+++ b/src/gdmuser/gdm-user-manager.c
@@ -3059,15 +3059,6 @@ gdm_user_manager_finalize (GObject *object)
         G_OBJECT_CLASS (gdm_user_manager_parent_class)->finalize (object);
 }
 
-static void
-gdm_user_muted_debug_log_handler (const char     *log_domain,
-                                  GLogLevelFlags  log_level,
-                                  const char     *message,
-                                  gpointer        data)
-{
-        /* Intentionally empty to discard message */
-}
-
 /**
  * gdm_user_manager_ref_default:
  *
@@ -3086,11 +3077,6 @@ gdm_user_manager_ref_default (void)
                 user_manager_object = g_object_new (GDM_TYPE_USER_MANAGER, NULL);
                 g_object_add_weak_pointer (user_manager_object,
                                            (gpointer *) &user_manager_object);
-
-                /* We don't normally care about user manager messages in the shell,
-                 * so mute them */
-                g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
-                                   gdm_user_muted_debug_log_handler, NULL);
         }
 
         return GDM_USER_MANAGER (user_manager_object);
diff --git a/src/gnome-shell-plugin.c b/src/gnome-shell-plugin.c
index 50e2c5c..ad2c4e6 100644
--- a/src/gnome-shell-plugin.c
+++ b/src/gnome-shell-plugin.c
@@ -302,10 +302,10 @@ add_statistics (GnomeShellPlugin *shell_plugin)
 }
 
 static void
-gvc_muted_debug_log_handler (const char     *log_domain,
-                             GLogLevelFlags  log_level,
-                             const char     *message,
-                             gpointer        data)
+muted_log_handler (const char     *log_domain,
+                   GLogLevelFlags  log_level,
+                   const char     *message,
+                   gpointer        data)
 {
   /* Intentionally empty to discard message */
 }
@@ -375,9 +375,13 @@ gnome_shell_plugin_start (MetaPlugin *plugin)
                                             NULL);
   g_strfreev(search_path);
 
-  /* Disable the gnome-volume-control debug */
+  /* Disable debug spew from various libraries */
   g_log_set_handler ("Gvc", G_LOG_LEVEL_DEBUG,
-                     gvc_muted_debug_log_handler, NULL);
+                     muted_log_handler, NULL);
+  g_log_set_handler ("GdmUser", G_LOG_LEVEL_DEBUG,
+                     muted_log_handler, NULL);
+  g_log_set_handler ("libgnome-bluetooth", G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_MESSAGE,
+                     muted_log_handler, NULL);
 
   /* Initialize the global object here. */
   shell_plugin->global = shell_global_get ();



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