From 4bba8ae2679ad53069215406c6e97d7367222afa Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 11 Jun 2014 01:25:33 +0200 Subject: [PATCH] Set default logging to INFO and switch to DEBUG when debugging is enabled. --- src/ddns/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ddns/__init__.py b/src/ddns/__init__.py index ff3d3cc..553a3fc 100644 --- a/src/ddns/__init__.py +++ b/src/ddns/__init__.py @@ -34,7 +34,7 @@ from .system import DDNSSystem # Setup the logger. def setup_logging(): rootlogger = logging.getLogger("ddns") - rootlogger.setLevel(logging.DEBUG) + rootlogger.setLevel(logging.INFO) # Setup a logger that logs to syslog. #handler = logging.handlers.SysLogHandler(address="/dev/log") @@ -49,6 +49,7 @@ class DDNSCore(object): # In debug mode, enable debug logging. if debug: logger.setLevel(logging.DEBUG) + logger.debug(_("Debugging mode enabled")) # Initialize the settings array. self.settings = {} -- 2.39.5