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

gh-92859: Doc: add info about logging.debug() calling basicConfig() (GH-93063) #93063

Merged
merged 2 commits into from May 23, 2022

Conversation

Gaasmann
Copy link
Contributor

@Gaasmann Gaasmann commented May 22, 2022

This adds some info about logging.debug() (and other level functions)
calling basicConfig() on behalf of the user if logging wasn't configured
beforehand.

#92859

@Gaasmann Gaasmann requested a review from vsajip as a code owner May 22, 2022
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented May 22, 2022

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@bedevere-bot bedevere-bot added docs awaiting review labels May 22, 2022
Copy link
Member

@vsajip vsajip left a comment

Thanks, I've asked for some minor tweaks.

@@ -242,6 +242,10 @@ is the module's name in the Python package namespace.
above example). In such circumstances, it is likely that specialized
:class:`Formatter`\ s would be used with particular :class:`Handler`\ s.

If no handler is attached to this logger (or its parents if
Copy link
Member

@vsajip vsajip May 22, 2022

Choose a reason for hiding this comment

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

Perhaps change to

If no handler is attached to this logger (or any of its ancestors,
taking into account the relevant :attr:`Logger.propagate` attributes),
the message will be sent ...

Copy link
Contributor Author

@Gaasmann Gaasmann May 22, 2022

Choose a reason for hiding this comment

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

Addressed on d173e5b

@@ -1038,6 +1042,9 @@ functions.
above example). In such circumstances, it is likely that specialized
:class:`Formatter`\ s would be used with particular :class:`Handler`\ s.

The function will call :func:`basicConfig` if the root logger doesn't have
Copy link
Member

@vsajip vsajip May 22, 2022

Choose a reason for hiding this comment

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

Change to

This function (as well as :func:`info`, :func:`warning`, :func:`error` and :func:`critical`) will call ...

Copy link
Contributor Author

@Gaasmann Gaasmann May 22, 2022

Choose a reason for hiding this comment

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

Addressed on d173e5b

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented May 22, 2022

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.

Gaasmann added 2 commits May 22, 2022
This adds some info about logging.debug() (and other level functions)
calling basicConfig() on behalf of the user if logging wasn't configured
beforehand.
@cpython-cla-bot
Copy link

@cpython-cla-bot cpython-cla-bot bot commented May 22, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

Copy link
Contributor Author

@Gaasmann Gaasmann left a comment

I have made the requested changes; please review again
(sorry for the force push, I reset my email on the first commit)

@@ -242,6 +242,10 @@ is the module's name in the Python package namespace.
above example). In such circumstances, it is likely that specialized
:class:`Formatter`\ s would be used with particular :class:`Handler`\ s.

If no handler is attached to this logger (or its parents if
Copy link
Contributor Author

@Gaasmann Gaasmann May 22, 2022

Choose a reason for hiding this comment

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

Addressed on d173e5b

@@ -1038,6 +1042,9 @@ functions.
above example). In such circumstances, it is likely that specialized
:class:`Formatter`\ s would be used with particular :class:`Handler`\ s.

The function will call :func:`basicConfig` if the root logger doesn't have
Copy link
Contributor Author

@Gaasmann Gaasmann May 22, 2022

Choose a reason for hiding this comment

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

Addressed on d173e5b

@Gaasmann Gaasmann requested a review from vsajip May 22, 2022
@vsajip vsajip changed the title gh-92859: Doc: add info about logging.debug() calling basicConfig() gh-92859: Doc: add info about logging.debug() calling basicConfig() (GH-93063) May 23, 2022
@vsajip vsajip merged commit 2176898 into python:main May 23, 2022
13 checks passed
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 23, 2022

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

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 23, 2022

Thanks @Gaasmann for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 23, 2022
…ig() (pythonGH-93063)

(cherry picked from commit 2176898)

Co-authored-by: Nicolas Haller <nicolas@haller.im>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented May 23, 2022

GH-93150 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 23, 2022
…ig() (pythonGH-93063)

(cherry picked from commit 2176898)

Co-authored-by: Nicolas Haller <nicolas@haller.im>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented May 23, 2022

GH-93151 is a backport of this pull request to the 3.11 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants