From 87649e22f65f444c1ec1b7bd3ec1dc545e413132 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 22 Jun 2014 10:09:50 +0000 Subject: [PATCH] Properly enable debug logging. --- src/ddns/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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. -- 2.39.2