[libgdata] Replacing g_log_set_default_handler with g_log_set_handler



commit 13e3571490d41aaff4761df12f0d97d5b048a5d1
Author: Peteris Krisjanis <pecisk gmail com>
Date:   Sat Jun 29 21:34:21 2013 +0300

    Replacing g_log_set_default_handler with g_log_set_handler
    
    Replacing g_log_set_default_handler with g_log_set_handler for all message types except 
G_LOG_LEVEL_DEBUG, as setting default handler means it catches messages from all other domains, t.i. from 
other libraries and applications.
    
    Closes: https://bugzilla.gnome.org/show_bug.cgi?id=703192

 gdata/gdata-service.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdata/gdata-service.c b/gdata/gdata-service.c
index 1d2f23f..42b795e 100644
--- a/gdata/gdata-service.c
+++ b/gdata/gdata-service.c
@@ -194,8 +194,8 @@ gdata_service_init (GDataService *self)
        self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_SERVICE, GDataServicePrivate);
        self->priv->session = _gdata_service_build_session ();
 
-       /* Debug log handling */
-       g_log_set_default_handler ((GLogFunc) debug_handler, self);
+       /* Log handling for all message types except debug */
+       g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_ERROR | G_LOG_LEVEL_INFO | 
G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_WARNING, (GLogFunc) debug_handler, self);
 
        /* Proxy the SoupSession's proxy-uri and timeout properties */
        g_signal_connect (self->priv->session, "notify::proxy-uri", (GCallback) notify_proxy_uri_cb, self);


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