Skip to content

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

Merged
vsajip merged 3 commits into
python:mainfrom
hartwork:issue-133577-logging-basicconfig-support-formatter-class
May 14, 2025
Merged

gh-133577: Add parameter formatter to logging.basicConfig#133578
vsajip merged 3 commits into
python:mainfrom
hartwork:issue-133577-logging-basicconfig-support-formatter-class

Conversation

@hartwork

@hartwork hartwork commented May 7, 2025

Copy link
Copy Markdown
Contributor

@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 ZeroIntensity left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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

@vsajip

vsajip commented May 12, 2025

Copy link
Copy Markdown
Member

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
Copy Markdown
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