Skip to content

Commit 9c8c79e

Browse files
vaishnavi192mattwang44
authored andcommitted
pythongh-113350: Improve the wording of python logging docs to remove an ambiguity around use of the word "higher". (pythonGH-113491)
Co-authored-by: Wei-Hsiang (Matt) Wang <[email protected]>
1 parent 6cf5ed5 commit 9c8c79e

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

Doc/howto/logging-cookbook.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,10 @@ Suppose you configure logging with the following JSON:
332332
}
333333
}
334334
335-
This configuration does *almost* what we want, except that ``sys.stdout`` would
336-
show messages of severity ``ERROR`` and above as well as ``INFO`` and
337-
``WARNING`` messages. To prevent this, we can set up a filter which excludes
338-
those messages and add it to the relevant handler. This can be configured by
335+
This configuration does *almost* what we want, except that ``sys.stdout`` would show messages
336+
of severity ``ERROR`` and only events of this severity and higher will be tracked
337+
as well as ``INFO`` and ``WARNING`` messages. To prevent this, we can set up a filter which
338+
excludes those messages and add it to the relevant handler. This can be configured by
339339
adding a ``filters`` section parallel to ``formatters`` and ``handlers``:
340340

341341
.. code-block:: json

Doc/howto/logging.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,8 @@ described below (in increasing order of severity):
8989
| | itself may be unable to continue running. |
9090
+--------------+---------------------------------------------+
9191

92-
The default level is ``WARNING``, which means that only events of this level
93-
and above will be tracked, unless the logging package is configured to do
94-
otherwise.
92+
The default level is ``WARNING``, which means that only events of this severity and higher
93+
will be tracked, unless the logging package is configured to do otherwise.
9594

9695
Events that are tracked can be handled in different ways. The simplest way of
9796
handling tracked events is to print them to the console. Another common way

0 commit comments

Comments
 (0)