]> git.ipfire.org Git - oddments/ddns.git/commitdiff
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 e4e484e01323db1187d4640b11600765c0738618..09511ce66800fa26d0247faa2aded043c32a34a0 100644 (file)
@@ -52,7 +52,11 @@ class DDNSCore(object):
        def __init__(self, debug=False):
                # In debug mode, enable debug logging.
                if debug:
        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.
                        logger.debug(_("Debugging mode enabled"))
 
                # Initialize the settings array.