From: Michael Tremer Date: Sun, 22 Jun 2014 10:09:50 +0000 (+0000) Subject: Properly enable debug logging. X-Git-Tag: 001~28 X-Git-Url: http://git.ipfire.org/?p=people%2Fstevee%2Fddns.git;a=commitdiff_plain;h=87649e22f65f444c1ec1b7bd3ec1dc545e413132 Properly enable debug logging. --- diff --git a/src/ddns/__init__.py b/src/ddns/__init__.py index e4e484e..09511ce 100644 --- a/src/ddns/__init__.py +++ b/src/ddns/__init__.py @@ -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.