bpo-40544: Set the validate field in logging Formatter with fileConfig#19991
bpo-40544: Set the validate field in logging Formatter with fileConfig#19991mirii1994 wants to merge 2 commits intopython:mainfrom
Conversation
…n using logging.config.fileConfig
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
|
Are you using a custom style which is not one of the three supported styles? If so, perhaps |
|
@vsajip Thanks for the quick response. It is a custom style. I know I can use dictConfig, but I do think that allowing the usage of |
Lib/logging/config.py
Outdated
| vld = True | ||
| if vldstr == "False": | ||
| vld = False |
There was a problem hiding this comment.
I suggest this be simplified to vld = (vldstr != "False").
vsajip
left a comment
There was a problem hiding this comment.
Possibly a test could also be added for various values in the configuration.
|
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 |
|
@vsajip I have made the requested changes; please review again |
|
Thanks for making the requested changes! @vsajip: please review the changes made to this pull request. |
|
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 |
|
This PR seems to have been abandoned by the OP. Shall we close it? |
Yes, I'll do that. |
https://bugs.python.org/issue40544
This PR fixes python 3.8 bug that caused because of the add of the
validateparam (default: True) inlogging.Formatter, it causing it to throws ValueError exception if theformatparam is not one of the 3 styles.There was no way to set
validatefield when usinglogging.config.fileConfig, which breaks the code to users who want to upgrade to 3.8.https://bugs.python.org/issue40544