KEMBAR78
gh-133577: Add parameter `formatter` to `logging.basicConfig` by hartwork · Pull Request #133578 · python/cpython · GitHub
Skip to content

Conversation

@hartwork
Copy link
Contributor

@hartwork hartwork commented May 7, 2025

@hartwork hartwork requested a review from vsajip as a code owner May 7, 2025 12:41
@hartwork hartwork force-pushed the issue-133577-logging-basicconfig-support-formatter-class branch from 59777ee to e7e2ccf Compare May 7, 2025 19:30
@hartwork hartwork changed the title gh-133577: Add parameter formatter_class to logging.basicConfig gh-133577: Add parameter formatter to logging.basicConfig May 7, 2025
Copy link
Member

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

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

Needs a test and documentation update, not just the docstring.

@@ -0,0 +1 @@
Add parameter ``formatter`` to ``logging.basicConfig``.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Add parameter ``formatter`` to ``logging.basicConfig``.
Add parameter ``formatter`` to :func:`logging.basicConfig`.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ZeroIntensity done 👍

@hartwork
Copy link
Contributor Author

Needs a test and documentation update, not just the docstring.

@ZeroIntensity thanks for your interest and I agree. I'm happy to take this to completion if there is buy-in from the CPython project. Before a new direction from @vsajip at #133577 any more changes here seems to be at risk of ending up in the trash can. Can you help me clear up the situation? Is this feature welcome or not? I would rather be sure first, and then go all in.

@ZeroIntensity
Copy link
Member

I'm not at liberty to approve the feature, but I'm personally +1. I defer to @vsajip.

@vsajip
Copy link
Member

vsajip commented May 12, 2025

Before a new direction from @vsajip

I'll look favorably on the change where you pass in a formatter instance rather than a class, as that is more generally useful than your earlier suggestion. Please go ahead and update the documentation and tests, as suggested by @ZeroIntensity.

@hartwork
Copy link
Contributor Author

@vsajip cool! Pushed, looking forward to your readme 🙏

@hartwork hartwork force-pushed the issue-133577-logging-basicconfig-support-formatter-class branch from 0b80bc8 to 6454d34 Compare May 13, 2025 02:07
@vsajip vsajip merged commit 2eb49d2 into python:main May 14, 2025
43 checks passed
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants