-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Description
logging.Handler and logging.StreamHandler both have useful repr implementations:
>>> import logging
>>> logging.StreamHandler()
<StreamHandler <stderr> (NOTSET)>But Formatter and Filter don't, so you just get the default unhelpful object repr:
>>> logging.Formatter('%(message)s')
<logging.Formatter object at 0x...>
>>> logging.Filter('myapp')
<logging.Filter object at 0x...>These should have repr consistent with the existing style, e.g.:
>>> logging.Formatter('%(message)s')
<Formatter (%(message)s)>
>>> logging.Filter('myapp')
<Filter (myapp)>This would help when inspecting logging configurations in the REPL or debugger.
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Projects
Status
No status