# HG changeset patch # User Tuomo Valkonen # Date 1516962900 0 # Node ID 4f0e9cf8f230c529ffe32236f6078f68ece2b65c # Parent e0e6043779e2641ad7e3101daf2d357d601ba367 Added --debug switch to enable debug logging level diff -r e0e6043779e2 -r 4f0e9cf8f230 borgend.py --- 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)