From a9a789aa8ac28e08e97ea9eb2bb17c2d0ef1697b Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Mon, 15 Apr 2013 20:39:57 +0200 Subject: [PATCH] conf: Rename logging.levels to loglevels Part of #280 --- docs/config.rst | 8 ++++---- docs/extensiondev.rst | 2 +- docs/troubleshooting.rst | 2 +- mopidy/config/__init__.py | 2 +- mopidy/config/default.conf | 2 +- mopidy/frontends/http/ext.conf | 2 +- mopidy/utils/log.py | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/config.rst b/docs/config.rst index 44e65875..e1affe5b 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -97,11 +97,11 @@ Core configuration values The file to dump debug log data to when Mopidy is run with the :option:`mopidy --save-debug-log` option. -.. confval:: logging.levels/* +.. confval:: loglevels/* - The ``logging.levels`` config section can be used to change the log level - for specific parts of Mopidy during development or debugging. Each key in - the config section should match the name of a logger. The value is the log + The ``loglevels`` config section can be used to change the log level for + specific parts of Mopidy during development or debugging. Each key in the + config section should match the name of a logger. The value is the log level to use for that logger, one of ``debug``, ``info``, ``warning``, ``error``, or ``critical``. diff --git a/docs/extensiondev.rst b/docs/extensiondev.rst index 106ae219..19bba824 100644 --- a/docs/extensiondev.rst +++ b/docs/extensiondev.rst @@ -365,4 +365,4 @@ Is much better than:: If you want to turn on debug logging for your own extension, but not for everything else due to the amount of noise, see the docs for the -:confval:`logging.levels/*` config section. +:confval:`loglevels/*` config section. diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index e590c86c..0c0f10da 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -42,7 +42,7 @@ run :option:`mopidy --save-debug-log`, it will save the debug log to the file ``mopidy.log`` in the directory you ran the command from. If you want to turn on more or less logging for some component, see the -docs for the :confval:`logging.levels/*` config section. +docs for the :confval:`loglevels/*` config section. Debugging deadlocks diff --git a/mopidy/config/__init__.py b/mopidy/config/__init__.py index 73b384c2..4aac8dec 100644 --- a/mopidy/config/__init__.py +++ b/mopidy/config/__init__.py @@ -17,7 +17,7 @@ _logging_schema['console_format'] = String() _logging_schema['debug_format'] = String() _logging_schema['debug_file'] = Path() -_loglevels_schema = LogLevelConfigSchema('logging.levels') +_loglevels_schema = LogLevelConfigSchema('loglevels') _audio_schema = ConfigSchema('audio') _audio_schema['mixer'] = String() diff --git a/mopidy/config/default.conf b/mopidy/config/default.conf index 1d7d7338..037645cc 100644 --- a/mopidy/config/default.conf +++ b/mopidy/config/default.conf @@ -3,7 +3,7 @@ console_format = %(levelname)-8s %(message)s debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s debug_file = mopidy.log -[logging.levels] +[loglevels] pykka = info [audio] diff --git a/mopidy/frontends/http/ext.conf b/mopidy/frontends/http/ext.conf index 8f8f2a1e..04fb1aae 100644 --- a/mopidy/frontends/http/ext.conf +++ b/mopidy/frontends/http/ext.conf @@ -4,5 +4,5 @@ hostname = 127.0.0.1 port = 6680 static_dir = -[logging.levels] +[loglevels] cherrypy = warning diff --git a/mopidy/utils/log.py b/mopidy/utils/log.py index ff593e09..d17206aa 100644 --- a/mopidy/utils/log.py +++ b/mopidy/utils/log.py @@ -20,7 +20,7 @@ def setup_logging(config, verbosity_level, save_debug_log): def setup_log_levels(config): - for name, level in config['logging.levels'].items(): + for name, level in config['loglevels'].items(): logging.getLogger(name).setLevel(level)