Skip to content

The table on logging debug levels is unclear #107877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
far-authentise opened this issue Aug 11, 2023 · 3 comments
Closed

The table on logging debug levels is unclear #107877

far-authentise opened this issue Aug 11, 2023 · 3 comments
Labels
3.11 only security fixes 3.12 only security fixes 3.13 bugs and security fixes docs Documentation in the Doc dir

Comments

@far-authentise
Copy link

far-authentise commented Aug 11, 2023

Existing Table

Many readers need a quick discussion to interpert the current table:

Level Numeric value
logging.CRITICAL 50
logging.ERROR 40
logging.WARNING 30
logging.INFO 20
logging.DEBUG 10
logging.NOTSET 0

Suggested Table

Level Numeric value Info
logging.CRITICAL 50 Only crashing bugs
logging.ERROR 40 The above, & major errors
logging.WARNING 30 The above, & minor errors
logging.INFO 20 The above, & detailed info
logging.DEBUG 10 The above, & 'helpful' messages
logging.NOTSET 0 No error logging

The number of times I've had a bug in code due to the misunderstanding, or the number of times I've needed a whiteboard and 5 minutes to explain this concept is astounding. For some reason, it's just not intuitive for like 1/3 of people I have trained or worked with.

Linked PRs

@far-authentise far-authentise added the docs Documentation in the Doc dir label Aug 11, 2023
@tyler-authentise
Copy link

tyler-authentise commented Aug 11, 2023

As an unbiased user I also think this is a great Idea 👍

@AA-Turner AA-Turner changed the title Table on Debug levels is unclear, suggestions for easier parsing The table on logging debug levels is unclear Aug 11, 2023
@AA-Turner AA-Turner added 3.11 only security fixes 3.12 only security fixes 3.13 bugs and security fixes labels Aug 11, 2023
@AA-Turner
Copy link
Member

cc: @vsajip

@AA-Turner
Copy link
Member

Perhaps this table should link to the table in the HOWTO, which does give descriptive overviews? It may be that those descriptions aren't discoverable enough.

That table might also include information on NOTSET, as it does not mean "No error logging", but rather one of two things dependent on status as the root logger.

A

vsajip added a commit to vsajip/cpython that referenced this issue Aug 12, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 13, 2023
…teria. (pythonGH-107894)

(cherry picked from commit cc2cf85)

Co-authored-by: Vinay Sajip <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 13, 2023
…teria. (pythonGH-107894)

(cherry picked from commit cc2cf85)

Co-authored-by: Vinay Sajip <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
vsajip pushed a commit that referenced this issue Aug 13, 2023
…iteria. (GH-107894) (GH-107921)

gh-107877: Update logging levels reference table with usage criteria. (GH-107894)
(cherry picked from commit cc2cf85)
Yhg1s pushed a commit that referenced this issue Aug 14, 2023
…iteria. (GH-107894) (#107922)

gh-107877: Update logging levels reference table with usage criteria. (GH-107894)
(cherry picked from commit cc2cf85)

Co-authored-by: Vinay Sajip <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
@vsajip vsajip closed this as completed Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes 3.12 only security fixes 3.13 bugs and security fixes docs Documentation in the Doc dir
Projects
Development

No branches or pull requests

4 participants