Allow using QueueHandler and QueueListener in logging.dictConfig · Issue #93162 · python/cpython (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@spacemanspiff2007

Description

@spacemanspiff2007

Feature or enhancement

Allow using instances in the dict passed to dictConfig

Pitch

Currently the logging configuration does not allow passing already created instances of e.g. logging.Handler.
However this would be very useful for an application that uses the dict to configure the logger but wants to use a QueueHandler that implements custom logic.
Since the logging.Handlers and logging.Filters need to be attached to the QueueListener for logging to files it's almost impossible to set it up properly.
If it would be possible to pass an instance the setup could be simplified a lot.

Previous discussion