borgend.py

changeset 73
4f0e9cf8f230
parent 52
aef860e99323
child 74
4f56142e7497
--- a/borgend.py	Fri Jan 26 10:31:21 2018 +0000
+++ b/borgend.py	Fri Jan 26 10:35:00 2018 +0000
@@ -17,7 +17,7 @@
 # Logging configuration
 #
 
-loglevel=logging.DEBUG
+loglevel=logging.INFO
 logfmt="%(asctime)s:%(levelname)s:%(name)s:%(message)s"
 fifolog_capacity=1000
 fifolog_fmt="%(asctime)s:%(levelname)s:%(message)s"
@@ -59,6 +59,12 @@
         action='store_true',
         help='Do not show the tray icon')
 
+    parser.add_argument(
+        '--debug',
+        dest='debug',
+        action='store_true',
+        help='Set logging level to debug')
+
     return parser.parse_args()
 
 #
@@ -79,6 +85,9 @@
     try:
         args=do_args()
 
+        if args.debug:
+            logger.setLevel(logging.DEBUG)
+
         if not os.path.isdir(config.logs_dir):
             os.makedirs(config.logs_dir)
 

mercurial