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)03d
directive inlog_format
parameter. But there are cases when you need to specify microseconds inlog_date_format
and%(msecs)03d
doesn'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%f
it seems impossible to get microseconds.Docs says that
log_date_format
is strf-compatible, no microseconds there too.I look at it like at suggestion to include support of
%f
inlog_date_format
.P.S. Sorry if my English might seem bad, I tried my best 😄
Beta Was this translation helpful? Give feedback.
All reactions