From: Michael Tremer Date: Tue, 10 Jun 2014 23:25:33 +0000 (+0200) Subject: Set default logging to INFO and switch to DEBUG when debugging is enabled. X-Git-Tag: 001~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4bba8ae2679ad53069215406c6e97d7367222afa;p=ddns.git Set default logging to INFO and switch to DEBUG when debugging is enabled. --- 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 = {}