summaryrefslogtreecommitdiffstats
path: root/Doc/library/logging.rst
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2016-12-31 11:40:11 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2016-12-31 11:40:11 (GMT)
commitd489ac91020efcf7b76a9fed0a44891c334ba67e (patch)
treea0cbc56f0d2f317d39c9182d2e6f94a3ce91e7bb /Doc/library/logging.rst
parent8e9c42e8e827fd4212639671faec9cf4ff62b6e9 (diff)
downloadcpython-d489ac91020efcf7b76a9fed0a44891c334ba67e.zip
cpython-d489ac91020efcf7b76a9fed0a44891c334ba67e.tar.gz
cpython-d489ac91020efcf7b76a9fed0a44891c334ba67e.tar.bz2
Closes #28524: added default level for logging.disable().
Diffstat (limited to 'Doc/library/logging.rst')
-rw-r--r--Doc/library/logging.rst10
1 files changed, 9 insertions, 1 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
index 6098878..d03cc50 100644
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -1023,7 +1023,7 @@ functions.
handlers being added multiple times to the root logger, which can in turn
lead to multiple messages for the same event.
-.. function:: disable(lvl)
+.. function:: disable(lvl=CRITICAL)
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
@@ -1036,6 +1036,14 @@ functions.
overriding level, so that logging output again depends on the effective
levels of individual loggers.
+ Note that if you have defined any custom logging level higher than
+ ``CRITICAL`` (this is not recommended), you won't be able to rely on the
+ default value for the *lvl* parameter, but will have to explicitly supply a
+ suitable value.
+
+ .. versionchanged:: 3.7
+ The *lvl* parameter was defaulted to level ``CRITICAL``. See Issue
+ #28524 for more information about this change.
.. function:: addLevelName(lvl, levelName)