diff --git a/couchpotato/core/_base/scheduler/main.py b/couchpotato/core/_base/scheduler/main.py index fb3b01ee..d09efedb 100644 --- a/couchpotato/core/_base/scheduler/main.py +++ b/couchpotato/core/_base/scheduler/main.py @@ -15,8 +15,6 @@ class Scheduler(Plugin): def __init__(self): - logging.getLogger('apscheduler').setLevel(logging.ERROR) - addEvent('schedule.cron', self.cron) addEvent('schedule.interval', self.interval) addEvent('schedule.start', self.start) diff --git a/couchpotato/core/notifications/growl/main.py b/couchpotato/core/notifications/growl/main.py index eadea51c..b98888e3 100644 --- a/couchpotato/core/notifications/growl/main.py +++ b/couchpotato/core/notifications/growl/main.py @@ -16,8 +16,6 @@ class Growl(Notification): def __init__(self): super(Growl, self).__init__() - logging.getLogger('gntp').setLevel(logging.WARNING) - if self.isEnabled(): self.register() diff --git a/couchpotato/core/plugins/scanner/main.py b/couchpotato/core/plugins/scanner/main.py index 4003a96b..a8824415 100644 --- a/couchpotato/core/plugins/scanner/main.py +++ b/couchpotato/core/plugins/scanner/main.py @@ -16,9 +16,6 @@ import re import time import traceback -enzyme_logger = logging.getLogger('enzyme') -enzyme_logger.setLevel(logging.INFO) - log = CPLog(__name__) @@ -97,10 +94,6 @@ class Scanner(Plugin): addEvent('rename.after', after_rename) - # Disable lib logging - logging.getLogger('guessit').setLevel(logging.ERROR) - logging.getLogger('subliminal').setLevel(logging.ERROR) - def scanFilesToLibrary(self, folder = None, files = None): groups = self.scan(folder = folder, files = files) diff --git a/couchpotato/runner.py b/couchpotato/runner.py index 696313f7..e8f2fb0d 100644 --- a/couchpotato/runner.py +++ b/couchpotato/runner.py @@ -116,12 +116,16 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En if not development: atexit.register(cleanup) + # Disable logging for some modules + for logger_name in ['enzyme', 'guessit', 'subliminal', 'apscheduler']: + logging.getLogger(logger_name).setLevel(logging.ERROR) + + for logger_name in ['gntp', 'werkzeug', 'migrate']: + logging.getLogger(logger_name).setLevel(logging.WARNING) + # Use reloader reloader = debug is True and development and not Env.get('desktop') and not options.daemon - # Disable server access log - logging.getLogger('werkzeug').setLevel(logging.WARNING) - # Only run once when debugging fire_load = False if os.environ.get('WERKZEUG_RUN_MAIN') or not reloader: @@ -168,7 +172,6 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En from migrate.versioning.api import version_control, db_version, version, upgrade repo = os.path.join(base_path, 'couchpotato', 'core', 'migration') - logging.getLogger('migrate').setLevel(logging.WARNING) # Disable logging for migration latest_db_version = version(repo) try: