From bac3bfb7a2e47634334c2adb8350e5005bccecf7 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Mon, 11 Aug 2014 01:31:25 +0200 Subject: [PATCH] log: Don't disable loggers when loading fileConfig The default when loading config for logging from a file is to disable existing loggers. Since some loggers are created before logging is set up, these loggers were disabled if logging/config_file is set. (cherry picked from commit cb0387c46d7c65d141355ce716764f7b05ef3f3f) Conflicts: docs/changelog.rst --- docs/changelog.rst | 3 +++ mopidy/utils/log.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index c0d48ec4..eddf10b7 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -14,6 +14,9 @@ Bug fix release. arguments. This was incorrectly returning artists after the MPD command changes in 0.19.0. (Fixes: :issue:`817`) +- Logging: Fix that some loggers would be disabled if logging/config_file was + set. + v0.19.3 (2014-08-03) ==================== diff --git a/mopidy/utils/log.py b/mopidy/utils/log.py index 5d6d3635..c461b434 100644 --- a/mopidy/utils/log.py +++ b/mopidy/utils/log.py @@ -47,7 +47,8 @@ def setup_logging(config, verbosity_level, save_debug_log): if config['logging']['config_file']: # Logging config from file must be read before other handlers are # added. If not, the other handlers will have no effect. - logging.config.fileConfig(config['logging']['config_file']) + logging.config.fileConfig(config['logging']['config_file'], + disable_existing_loggers=False) setup_console_logging(config, verbosity_level) if save_debug_log: