]> git.ipfire.org Git - ddns.git/commitdiff
Set default logging to INFO and switch to DEBUG when debugging is enabled.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Jun 2014 23:25:33 +0000 (01:25 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Jun 2014 23:25:33 +0000 (01:25 +0200)
src/ddns/__init__.py

index ff3d3cc3d660d0fb0ffebdbb3121eec51f9e462d..553a3fc42ece23c0f2446cf58d8d984ccd31f734 100644 (file)
@@ -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 = {}