[gvfs] various: reduce the verboseness of debug messages



commit edd777b1e675f9328aa00934651b4763783930a1
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Wed Jan 29 19:59:55 2014 +0100

    various: reduce the verboseness of debug messages
    
    With a recent enough dbus-daemon (or with kdbus), the standard
    error of dbus activated services is sent to the journal, so
    we should not pollute it with debug messages by default.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723251

 daemon/gvfsbackendgphoto2.c |    4 +---
 daemon/gvfsbackendmtp.c     |    8 ++------
 2 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/daemon/gvfsbackendgphoto2.c b/daemon/gvfsbackendgphoto2.c
index bd759fc..62d85d7 100644
--- a/daemon/gvfsbackendgphoto2.c
+++ b/daemon/gvfsbackendgphoto2.c
@@ -310,10 +310,8 @@ DEBUG (const gchar *message, ...)
 #ifdef DEBUG_SHOW_TRACES
   va_list args;
   va_start (args, message);
-  g_vfprintf (stderr, message, args);
+  g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, message, args);
   va_end (args);
-  g_fprintf (stderr, "\n");
-  fflush (stderr);
 #endif
 }
 
diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c
index 2b6618d..a7848e8 100644
--- a/daemon/gvfsbackendmtp.c
+++ b/daemon/gvfsbackendmtp.c
@@ -68,10 +68,8 @@ DEBUG (const gchar *message, ...)
 #if DEBUG_SHOW_TRACES
   va_list args;
   va_start (args, message);
-  g_vfprintf (stderr, message, args);
+  g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, message, args);
   va_end (args);
-  g_fprintf (stderr, "\n");
-  fflush (stderr);
 #endif
 }
 
@@ -81,10 +79,8 @@ DEBUG_ENUMERATE (const gchar *message, ...)
 #if DEBUG_SHOW_ENUMERATE_TRACES
   va_list args;
   va_start (args, message);
-  g_vfprintf (stderr, message, args);
+  g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, message, args);
   va_end (args);
-  g_fprintf (stderr, "\n");
-  fflush (stderr);
 #endif
 }
 


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