Fix asctime formatting, don't print uninitialized buffer's content (issue #203)#208
Fix asctime formatting, don't print uninitialized buffer's content (issue #203)#208tonybaloney merged 9 commits intomicrosoft:mainfrom
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.