Skip to content

gh-133577: Add parameter formatter to logging.basicConfig #133578

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

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant

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
ZeroIntensity
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.

#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
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.

None yet

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant

3 participants

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant