Skip to content
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

[doc] Clarify the nature of the root logger in the logging documentation #119440

Merged
merged 4 commits into from
May 28, 2024

Conversation

jkunimune
Copy link
Contributor

@jkunimune jkunimune commented May 22, 2024

The way it's currently written, it's very confusing what the root logger's name is, because it's not explicitly stated anywhere (the how-to page says that its name "is printed as 'root'", which makes it sound like it's actually something else, but it's not it's just 'root'), and because it is stated that the logging hierarchy is based on period-separated names ("root" is the exception to this rule, and that exception isn't stated anywhere here).


📚 Documentation preview 📚: https://cpython-previews--119440.org.readthedocs.build/

The way it's currently written, it's very confusing what the root logger's name is, because it's not explicitly stated anywhere (the how-to page says that its name "is printed as 'root'", which makes it sound like it's actually something else, but it's not it's just 'root'), and because it is stated that the logging hierarchy is based on period-separated names (this is true except for "root", and that exception isn't stated anywhere here).
@jkunimune jkunimune requested a review from vsajip as a code owner May 22, 2024 21:53
Copy link

cpython-cla-bot bot commented May 22, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news awaiting review labels May 22, 2024
Doc/library/logging.rst Outdated Show resolved Hide resolved
Doc/library/logging.rst Outdated Show resolved Hide resolved
@bedevere-app
Copy link

bedevere-app bot commented May 23, 2024

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Understood about not wanting people to rely on the root logger's name being `'root'`.  I rephrased it to always refer to the root logger as simply "the root logger", as is done in the rest of the document.
@jkunimune
Copy link
Contributor Author

I have made the requested changes; please review again.

@bedevere-app
Copy link

bedevere-app bot commented May 24, 2024

Thanks for making the requested changes!

@vsajip: please review the changes made to this pull request.

@bedevere-app bedevere-app bot requested a review from vsajip May 24, 2024 18:18
Copy link
Member

@vsajip vsajip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your response to my earlier comment is fine, but as we're in the area, I thought maybe we can add another suggestion about logger naming. What do you think?

Doc/library/logging.rst Outdated Show resolved Hide resolved
@bedevere-app
Copy link

bedevere-app bot commented May 25, 2024

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
@jkunimune
Copy link
Contributor Author

Sure, that works for me. I have made the requested changes; please review again.

@bedevere-app
Copy link

bedevere-app bot commented May 25, 2024

Thanks for making the requested changes!

@vsajip: please review the changes made to this pull request.

@bedevere-app bedevere-app bot requested a review from vsajip May 25, 2024 13:57
@vsajip vsajip changed the title Clarify the nature of the root logger in the logging documentation [doc] Clarify the nature of the root logger in the logging documentation May 28, 2024
@vsajip vsajip merged commit b407ad3 into python:main May 28, 2024
26 of 28 checks passed
@vsajip vsajip added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels May 28, 2024
@miss-islington-app
Copy link

Thanks @jkunimune for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks @jkunimune for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 28, 2024
…ation (pythonGH-119440)

(cherry picked from commit b407ad3)

Co-authored-by: Justin Kunimune <justinkunimune@gmail.com>
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 28, 2024
…ation (pythonGH-119440)

(cherry picked from commit b407ad3)

Co-authored-by: Justin Kunimune <justinkunimune@gmail.com>
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
@bedevere-app
Copy link

bedevere-app bot commented May 28, 2024

GH-119651 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 28, 2024
@bedevere-app
Copy link

bedevere-app bot commented May 28, 2024

GH-119652 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label May 28, 2024
vsajip pushed a commit that referenced this pull request May 28, 2024
vsajip pushed a commit that referenced this pull request May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants