[gnome-keyring] daemon: Don't log debug messages to syslog



commit 86bd8c5a8eb9b0bd299645b5d2eaa6dd043b355f
Author: Stef Walter <stefw gnome org>
Date:   Thu Mar 6 16:13:49 2014 +0100

    daemon: Don't log debug messages to syslog
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711537

 daemon/gkd-main.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/daemon/gkd-main.c b/daemon/gkd-main.c
index d014ddc..8066c9d 100644
--- a/daemon/gkd-main.c
+++ b/daemon/gkd-main.c
@@ -296,7 +296,7 @@ log_handler (const gchar *log_domain, GLogLevelFlags log_level,
                level = LOG_INFO;
                break;
        case G_LOG_LEVEL_DEBUG:
-               level = LOG_DEBUG;
+               level = -1;
                break;
        default:
                level = LOG_ERR;
@@ -304,10 +304,12 @@ log_handler (const gchar *log_domain, GLogLevelFlags log_level,
        }
 
        /* Log to syslog first */
-       if (log_domain)
-               syslog (level, "%s: %s", log_domain, message);
-       else
-               syslog (level, "%s", message);
+       if (level != -1) {
+               if (log_domain)
+                       syslog (level, "%s: %s", log_domain, message);
+               else
+                       syslog (level, "%s", message);
+       }
 
        /* And then to default handler for aborting and stuff like that */
        g_log_default_handler (log_domain, log_level, message, user_data);


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