test_ok1/testing/logging
theirix 4da9026766
Handle microseconds with custom logging.Formatter (#11047)
Added handling of %f directive to print microseconds in log format options, such as log-date-format. It is impossible to do with a standard logging.Formatter because it uses time.strftime which doesn't know about milliseconds and %f. In this PR I added a custom Formatter which converts LogRecord to a datetime.datetime object and formats it with %f flag. This behaviour is enabled only if a microsecond flag is specified in a format string.

Also added a few tests to check the standard and changed behavior.

Closes #10991
2023-05-30 09:35:33 -03:00
..
test_fixture.py Handle disabled logging in 'caplog.set_level' and 'caplog.at_level' (#8758) 2023-05-18 10:18:59 -03:00
test_formatter.py cleanup tests by removal of unused code elements 2021-05-07 17:56:35 +05:30
test_reporting.py Handle microseconds with custom logging.Formatter (#11047) 2023-05-30 09:35:33 -03:00