Properly enable debug logging.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 22 Jun 2014 10:09:50 +0000 (10:09 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 22 Jun 2014 10:09:50 +0000 (10:09 +0000)
src/ddns/__init__.py

index e4e484e..09511ce 100644 (file)
@@ -52,7 +52,11 @@ class DDNSCore(object):
        def __init__(self, debug=False):
                # In debug mode, enable debug logging.
                if debug:
-                       logger.setLevel(logging.DEBUG)
+                       rootlogger = logging.getLogger("ddns")
+                       rootlogger.setLevel(logging.DEBUG)
+                       for handler in rootlogger.handlers:
+                               handler.setLevel(logging.DEBUG)
+
                        logger.debug(_("Debugging mode enabled"))
 
                # Initialize the settings array.