Skip to content

Commit

Permalink
log: Don't disable loggers when loading fileConfig
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
trygveaa committed Aug 10, 2014
1 parent e1fda35 commit cb0387c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ v0.20.0 (UNRELEASED)
- Add cover URL to all scanned files with MusicBrainz album IDs. (Fixes:
:issue:`697`, PR: :issue:`802`)

**Logging**

- Fix that some loggers would be disabled if logging/config_file was set.


v0.19.4 (UNRELEASED)
====================
Expand Down
3 changes: 2 additions & 1 deletion mopidy/utils/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cb0387c

Please sign in to comment.