From 97d6ce4ca3ee07782a61b868820d7048d455384f Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Sat, 31 Dec 2016 11:40:11 +0000 Subject: Closes #28524: added default level for logging.disable(). --- Doc/library/logging.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Doc/library/logging.rst') diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 6098878c1a..d03cc50d87 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) -- cgit v1.2.1