main: Add --debug option to increase verbosity.
[matthijs/projects/backupninja.git] / src / lib / backupninja / log.py
index 9fa85b8b92dc13494db8e40e840abbe9126c6bfb..d9d4dfac876d943af79698b2747c096af39f6ddc 100644 (file)
@@ -32,5 +32,8 @@ def setup_logging(options):
     options are the parsed commandline options.
     """
     # We use the default options for now
-    logging.basicConfig()
+    level = logging.INFO
+    if(options.debug):
+        level = logging.DEBUG
+    logging.basicConfig(level=level)
     log.debug("Initialized logging configuration")