Kaydet (Commit) 2060e422 authored tarafından Vinay Sajip's avatar Vinay Sajip

Issue #8162: logging: Clarified docstring and documentation for disable function.

üst 187f93d9
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment