]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-113350: Improve the wording of python logging docs to remove an ambiguity around...
authorVaishnavi Maheshwari <vaishnavi.m1084@gmail.com>
Wed, 27 Dec 2023 07:51:45 +0000 (13:21 +0530)
committerGitHub <noreply@github.com>
Wed, 27 Dec 2023 07:51:45 +0000 (07:51 +0000)
Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
Doc/howto/logging-cookbook.rst
Doc/howto/logging.rst

index 588f5a0a53ded0a78f4969f264c92254e216ecdf..ea494f2fdbbce42dbfd4531f7c0ed1da4a400342 100644 (file)
@@ -332,10 +332,10 @@ Suppose you configure logging with the following JSON:
         }
     }
 
-This configuration does *almost* what we want, except that ``sys.stdout`` would
-show messages of severity ``ERROR`` and above as well as ``INFO`` and
-``WARNING`` messages. To prevent this, we can set up a filter which excludes
-those messages and add it to the relevant handler. This can be configured by
+This configuration does *almost* what we want, except that ``sys.stdout`` would show messages
+of severity ``ERROR`` and only events of this severity and higher will be tracked
+as well as ``INFO`` and ``WARNING`` messages. To prevent this, we can set up a filter which
+excludes those messages and add it to the relevant handler. This can be configured by
 adding a ``filters`` section parallel to ``formatters`` and ``handlers``:
 
 .. code-block:: json
index 7330cf675baa36dda884bb36df3cadc78f90f1cf..f164b461c93b9cd1bf82835e42fc57a512a278c3 100644 (file)
@@ -89,9 +89,8 @@ described below (in increasing order of severity):
 |              | itself may be unable to continue running.   |
 +--------------+---------------------------------------------+
 
-The default level is ``WARNING``, which means that only events of this level
-and above will be tracked, unless the logging package is configured to do
-otherwise.
+The default level is ``WARNING``, which means that only events of this severity and higher
+will be tracked, unless the logging package is configured to do otherwise.
 
 Events that are tracked can be handled in different ways. The simplest way of
 handling tracked events is to print them to the console. Another common way