Title: logging.Formatter crashes when default_msec_format is None.
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.9, Python 3.8, Python 3.7, Python 3.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: felixxm, vinay.sajip
Priority: normal Keywords: patch

Created on 2020-04-16 10:09 by felixxm, last changed 2020-09-09 08:00 by vinay.sajip. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19551 merged felixxm, 2020-04-16 10:51
Messages (2)
msg366589 - (view) Author: Mariusz Felisiak (felixxm) * Date: 2020-04-16 10:09
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.

msg366660 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2020-04-17 16:03
New changeset 06a35542aad15666cace307d841a95e33f3cbee6 by Mariusz Felisiak in branch 'master':
bpo-40300: Allow empty logging.Formatter.default_msec_format. (GH-19551)
Date User Action Args
2020-09-09 08:00:16vinay.sajipsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-04-17 16:03:00vinay.sajipsetmessages: + msg366660
2020-04-16 10:51:52felixxmsetkeywords: + patch
stage: patch review
pull_requests: + pull_request18897
2020-04-16 10:33:25xtreaksetnosy: + vinay.sajip
2020-04-16 10:09:46felixxmcreate