-
Couldn't load subscription status.
- Fork 27
Fix asctime formatting, don't print uninitialized buffer's content (issue #203) #208
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
Conversation
|
According to https://docs.python.org/3/library/logging.html#logrecord-attributes, the default date format should have 3 digits instead of 6 for the millisecond portion of the time. |
…al python docs on logrecord-attributes
Fixed |
I ran this code and the return is still the same: |
This PR only fixes default asctime formatting (without datefmt argument). By default only milliseconds are supposed to be printed. |
|
Thanks @tarasko. Sorry I didn't respond earlier. This needs a regression test first on main. I'll do that now |
|
I prefer this implementation. thanks for submitting. Pushing a regression test to the PR then will be merging once everything passes |
I ran this code with |
Closes #203
Correctly format and print LogRecord.asctime field
Please merge this PR or #209
where %f support in datefmt was also added.