]> granicus.if.org Git - python/commitdiff
Issue #8162: logging: Clarified docstring and documentation for disable function.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Wed, 17 Mar 2010 15:05:57 +0000 (15:05 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Wed, 17 Mar 2010 15:05:57 +0000 (15:05 +0000)
Doc/library/logging.rst
Lib/logging/__init__.py

index 8bdea1038c2b4c08ecbe3ce243011efcf0ad242e..10772b4883767f50a7579902be44224b68feaf0b 100644 (file)
@@ -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)
index 7d70b4ae5faa5783338a942a1effd7209d1fd5fb..b1810d68e53768641da06489140685a6f1c6faf6 100644 (file)
@@ -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