[rygel] core: Load config before setting log handler



commit 48bf482bc6658e2222ebae42f5a5980d7b4d2d7a
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Oct 26 16:49:17 2009 +0200

    core: Load config before setting log handler
    
    Setting log handler before loading the config was suppressing all
    debug messages. However now we have the problem that ALL messages
    are printed even if they are of the level that is not allowed by the
    config. Hopefully this problem is much more tolerable than the problem
    this commit solves since there are not many messages printed before
    config is loaded.

 src/rygel/rygel-log-handler.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/rygel/rygel-log-handler.vala b/src/rygel/rygel-log-handler.vala
index d67e858..c6380cd 100644
--- a/src/rygel/rygel-log-handler.vala
+++ b/src/rygel/rygel-log-handler.vala
@@ -51,8 +51,6 @@ public class Rygel.LogHandler : GLib.Object {
     }
 
     private LogHandler () {
-        Log.set_default_handler (this.log_func);
-
         // Get the allowed log levels from the config
         var config = MetaConfig.get_default ();
 
@@ -64,6 +62,8 @@ public class Rygel.LogHandler : GLib.Object {
             warning ("Failed to get log level from configuration sources: %s",
                      err.message);
         }
+
+        Log.set_default_handler (this.log_func);
     }
 
     private void log_func (string?       log_domain,



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