diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2010-03-17 15:05:57 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2010-03-17 15:05:57 (GMT) |
commit | 2060e42206d12900a0875d7b31ecc9f99ff9e16c (patch) | |
tree | 199831d1b7647de783aebbc827dfa4e8e57300bc | |
parent | 187f93d986a571b0a7d797a3b114d5d877d261e1 (diff) | |
download | cpython-2060e42206d12900a0875d7b31ecc9f99ff9e16c.zip cpython-2060e42206d12900a0875d7b31ecc9f99ff9e16c.tar.gz cpython-2060e42206d12900a0875d7b31ecc9f99ff9e16c.tar.bz2 |
Issue #8162: logging: Clarified docstring and documentation for disable function.
-rw-r--r-- | Doc/library/logging.rst | 6 | ||||
-rw-r--r-- | Lib/logging/__init__.py | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 8bdea10..10772b4 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -735,7 +735,11 @@ functions. Provides an overriding level *lvl* for all loggers which takes precedence over the logger's own level. When the need arises to temporarily throttle logging - output down across the whole application, this function can be useful. + output down across the whole application, this function can be useful. Its + effect is to disable all logging calls of severity *lvl* and below, so that + if you call it with a value of INFO, then all INFO and DEBUG events would be + discarded, whereas those of severity WARNING and above would be processed + according to the logger's effective level. .. function:: addLevelName(lvl, levelName) diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 7d70b4a..b1810d68 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1557,7 +1557,7 @@ def log(level, msg, *args, **kwargs): def disable(level): """ - Disable all logging calls less severe than 'level'. + Disable all logging calls of severity 'level' and below. """ root.manager.disable = level |