[issue18689] add argument for formatter to logging.Handler and subclasses in logging module

Derek Wilson report at bugs.python.org
Mon Aug 12 19:16:05 CEST 2013


Derek Wilson added the comment:

dictConfig and fileConfig are nice for static needs, but when I want to quickly enable a complex (but not complicated) logging flow I find it just as tedious as the current situation with the direct API.

> ... as at the very least every handler would need to be changed to accommodate the new kwarg

Adding a keyword only argument to the base handler and the other handler classes is a nearly trivial change in terms of lines and complexity of the code.

> Also, this isn't going to work for third-party handlers which are out there already, since they won't necessarily recognise a new kwarg.

I don't see that as a problem. If 3rd party handlers are intelligent then they will include **kargs in their __init__ and pass that forward to the initialization of their parent. If they haven't done so then nothing changes for them and they just support exactly the same features they supported previously.

----------
status: pending -> open

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18689>
_______________________________________


More information about the Python-bugs-list mailing list