diff options
author | Vaishnavi Maheshwari <vaishnavi.m1084@gmail.com> | 2023-12-27 07:51:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-27 07:51:45 (GMT) |
commit | 00cdd416fc60876ff21d9eafdc5d5d7a91737db5 (patch) | |
tree | 2b5dfca450fdc9abf86252d8ed365ec051d43297 /Doc/howto | |
parent | af2b8f6845e31dd6ab3bb0bac41b19a0e023fd61 (diff) | |
download | cpython-00cdd416fc60876ff21d9eafdc5d5d7a91737db5.zip cpython-00cdd416fc60876ff21d9eafdc5d5d7a91737db5.tar.gz cpython-00cdd416fc60876ff21d9eafdc5d5d7a91737db5.tar.bz2 |
gh-113350: Improve the wording of python logging docs to remove an ambiguity around use of the word "higher". (GH-113491)
Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
Diffstat (limited to 'Doc/howto')
-rw-r--r-- | Doc/howto/logging-cookbook.rst | 8 | ||||
-rw-r--r-- | Doc/howto/logging.rst | 5 |
2 files changed, 6 insertions, 7 deletions
diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst index 588f5a0..ea494f2 100644 --- a/Doc/howto/logging-cookbook.rst +++ b/Doc/howto/logging-cookbook.rst @@ -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 diff --git a/Doc/howto/logging.rst b/Doc/howto/logging.rst index 7330cf6..f164b46 100644 --- a/Doc/howto/logging.rst +++ b/Doc/howto/logging.rst @@ -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 |