config: Add support for 'all' loglevel
Equal to logging.NOTSET or 0 in the logging module.
This commit is contained in:
parent
cc3e9d5597
commit
df67d708db
@ -26,6 +26,12 @@ v0.20.0 (UNRELEASED)
|
|||||||
- Make the ``mopidy`` command print a friendly error message if the
|
- Make the ``mopidy`` command print a friendly error message if the
|
||||||
:mod:`gobject` Python module cannot be imported. (Fixes: :issue:`836`)
|
:mod:`gobject` Python module cannot be imported. (Fixes: :issue:`836`)
|
||||||
|
|
||||||
|
**Configuration**
|
||||||
|
|
||||||
|
- Add support for the log level value ``all`` to the loglevels configurations.
|
||||||
|
This can be used to show absolutely all log records, including those at
|
||||||
|
custom levels below ``DEBUG``.
|
||||||
|
|
||||||
**Local backend**
|
**Local backend**
|
||||||
|
|
||||||
- Add cover URL to all scanned files with MusicBrainz album IDs. (Fixes:
|
- Add cover URL to all scanned files with MusicBrainz album IDs. (Fixes:
|
||||||
@ -50,7 +56,7 @@ v0.20.0 (UNRELEASED)
|
|||||||
|
|
||||||
- Enable browsing of artist references, in addition to albums and playlists.
|
- Enable browsing of artist references, in addition to albums and playlists.
|
||||||
(PR: :issue:`884`)
|
(PR: :issue:`884`)
|
||||||
|
|
||||||
- Share a single mapping between names and URIs across all MPD sessions. (Fixes:
|
- Share a single mapping between names and URIs across all MPD sessions. (Fixes:
|
||||||
:issue:`934`, PR: :issue:`968`)
|
:issue:`934`, PR: :issue:`968`)
|
||||||
|
|
||||||
|
|||||||
@ -200,8 +200,8 @@ class List(ConfigValue):
|
|||||||
class LogLevel(ConfigValue):
|
class LogLevel(ConfigValue):
|
||||||
"""Log level value.
|
"""Log level value.
|
||||||
|
|
||||||
Expects one of ``critical``, ``error``, ``warning``, ``info``, ``debug``
|
Expects one of ``critical``, ``error``, ``warning``, ``info``, ``debug``,
|
||||||
with any casing.
|
or ``all``, with any casing.
|
||||||
"""
|
"""
|
||||||
levels = {
|
levels = {
|
||||||
b'critical': logging.CRITICAL,
|
b'critical': logging.CRITICAL,
|
||||||
@ -209,6 +209,7 @@ class LogLevel(ConfigValue):
|
|||||||
b'warning': logging.WARNING,
|
b'warning': logging.WARNING,
|
||||||
b'info': logging.INFO,
|
b'info': logging.INFO,
|
||||||
b'debug': logging.DEBUG,
|
b'debug': logging.DEBUG,
|
||||||
|
b'all': logging.NOTSET,
|
||||||
}
|
}
|
||||||
|
|
||||||
def deserialize(self, value):
|
def deserialize(self, value):
|
||||||
|
|||||||
@ -281,11 +281,14 @@ class ListTest(unittest.TestCase):
|
|||||||
|
|
||||||
|
|
||||||
class LogLevelTest(unittest.TestCase):
|
class LogLevelTest(unittest.TestCase):
|
||||||
levels = {'critical': logging.CRITICAL,
|
levels = {
|
||||||
'error': logging.ERROR,
|
'critical': logging.CRITICAL,
|
||||||
'warning': logging.WARNING,
|
'error': logging.ERROR,
|
||||||
'info': logging.INFO,
|
'warning': logging.WARNING,
|
||||||
'debug': logging.DEBUG}
|
'info': logging.INFO,
|
||||||
|
'debug': logging.DEBUG,
|
||||||
|
'all': logging.NOTSET,
|
||||||
|
}
|
||||||
|
|
||||||
def test_deserialize_conversion_success(self):
|
def test_deserialize_conversion_success(self):
|
||||||
value = types.LogLevel()
|
value = types.LogLevel()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user