From 1b8efc890a4c7cfa8525e01692f890208badd801 Mon Sep 17 00:00:00 2001 From: Halali Date: Thu, 25 Oct 2018 13:56:02 +0200 Subject: [PATCH] Change debug logging level settings --- bazarr/logger.py | 9 +++++++-- bazarr/main.py | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bazarr/logger.py b/bazarr/logger.py index d44cfdaf2..9173fedd9 100644 --- a/bazarr/logger.py +++ b/bazarr/logger.py @@ -47,12 +47,17 @@ def configure_logging(): '%d/%m/%Y %H:%M:%S') fh.setFormatter(f) fh.addFilter(BlacklistFilter()) - logging.getLogger("enzyme").setLevel(logging.CRITICAL) - logging.getLogger("apscheduler").setLevel(logging.WARNING) + if log_level == 'debug': + logging.getLogger("apscheduler").setLevel(logging.DEBUG) logging.getLogger("subliminal").setLevel(logging.DEBUG) + logging.getLogger("git").setLevel(logging.DEBUG) + logging.getLogger("apprise").setLevel(logging.DEBUG) else: + logging.getLogger("apscheduler").setLevel(logging.WARNING) logging.getLogger("subliminal").setLevel(logging.CRITICAL) + + logging.getLogger("enzyme").setLevel(logging.CRITICAL) logging.getLogger("guessit").setLevel(logging.WARNING) logging.getLogger("rebulk").setLevel(logging.WARNING) logging.getLogger("stevedore.extension").setLevel(logging.CRITICAL) diff --git a/bazarr/main.py b/bazarr/main.py index a922b5f9a..ba8d62636 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -188,7 +188,7 @@ def restart(): except Exception as e: logging.error('BAZARR Cannot create bazarr.restart file.') else: - print 'Bazarr is being restarted...' + # print 'Bazarr is being restarted...' logging.info('Bazarr is being restarted...') restart_file.write('') restart_file.close() @@ -1895,7 +1895,7 @@ warnings.simplefilter("ignore", DeprecationWarning) server = CherryPyWSGIServer((str(ip), int(port)), app) try: logging.info('BAZARR is started and waiting for request on http://' + str(ip) + ':' + str(port) + str(base_url)) - print 'Bazarr is started and waiting for request on http://' + str(ip) + ':' + str(port) + str(base_url) + # print 'Bazarr is started and waiting for request on http://' + str(ip) + ':' + str(port) + str(base_url) server.start() except KeyboardInterrupt: shutdown()