[gvfs] Add prefixes in debug messages



commit 3959a77fa4a7316024e716c9014b788870d4ed37
Author: Ondrej Holy <oholy redhat com>
Date:   Fri Jan 20 16:16:33 2017 +0100

    Add prefixes in debug messages
    
    There is a lot of messages if all debug     output from gvfs is enabled.
    Let's add prefixes in order to find easily origin of the messages.

 client/gvfsfusedaemon.c |    2 +-
 daemon/daemon-main.c    |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c
index 4b1351d..6966490 100644
--- a/client/gvfsfusedaemon.c
+++ b/client/gvfsfusedaemon.c
@@ -105,7 +105,7 @@ log_debug (const gchar   *log_domain,
            gpointer       unused_data)
 {
   if (gvfs_get_debug ())
-    g_print ("%s", message);
+    g_print ("fuse: %s", message);
 }
 
 typedef struct {
diff --git a/daemon/daemon-main.c b/daemon/daemon-main.c
index ba67ad4..16ca8ed 100644
--- a/daemon/daemon-main.c
+++ b/daemon/daemon-main.c
@@ -48,10 +48,10 @@ static void
 log_debug (const gchar   *log_domain,
           GLogLevelFlags log_level,
           const gchar   *message,
-          gpointer           unused_data)
+           gpointer       user_data)
 {
   if (gvfs_get_debug ())
-    g_print ("%s", message);
+    g_print ("%s: %s", (const gchar *)user_data, message);
 }
 
 void
@@ -66,7 +66,7 @@ daemon_init (void)
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   textdomain (GETTEXT_PACKAGE);
   
-  g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, log_debug, NULL);
+  g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, log_debug, G_STRINGIFY (DEFAULT_BACKEND_TYPE));
 
   gvfs_setup_debug_handler ();
 


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