Replies: 1 comment 1 reply
-
|
based on https://docs.python.org/3/library/logging.html#logging.Formatter.formatTime it seems like this cant be supported nicely in a easy way we may need a additional config options for the milisecond value |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, ladies and gentlemen!
Some people solve the problem of microseconds in pytest.ini with
%(msecs)03ddirective inlog_formatparameter. But there are cases when you need to specify microseconds inlog_date_formatand%(msecs)03ddoesn't support there. For example, I work with logs data with caplog fixture. I get date from LogRecord object likeLogRecord.asctime. It returns the format specified inlog_date_format, so without%fit seems impossible to get microseconds.Docs says that
log_date_formatis strf-compatible, no microseconds there too.I look at it like at suggestion to include support of
%finlog_date_format.P.S. Sorry if my English might seem bad, I tried my best 😄
Beta Was this translation helpful? Give feedback.
All reactions