[New-bugs-announce] [issue40300] logging.Formatter crashes when default_msec_format is None.

Mariusz Felisiak report at bugs.python.org
Thu Apr 16 06:09:46 EDT 2020


New submission from Mariusz Felisiak <felisiak.mariusz at gmail.com>:

We would like to subclass logging.Formatter with a custom "default_time_format" and an empty "default_msec_format". Unfortunately logging.Formatter crashes when default_msec_format is None, see [1].

I'm happy to provide a patch.

[1] https://github.com/python/cpython/blob/5907e61a8d4da6d0f11bf1062d6d17484560a15e/Lib/logging/__init__.py#L607

----------
components: Library (Lib)
messages: 366589
nosy: Mariusz Felisiak
priority: normal
severity: normal
status: open
title: logging.Formatter crashes when default_msec_format is None.
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40300>
_______________________________________


More information about the New-bugs-announce mailing list