[Python-Dev] Proposed change to logging.basicConfig

Vinay Sajip vinay_sajip at yahoo.co.uk
Tue Mar 29 18:35:08 CEST 2011


I'm planning a change to logging.basicConfig to add an optional "handlers"
keyword argument which defaults to None.

If specified, this should be an iterable of already created handlers, which will
be added to the root logger (if it doesn't already have any handlers). Any
handler in the iterable which does not have a formatter assigned will be
assigned the formatter created by basicConfig.

If "handlers" is specified, the "stream", "filename" and "filemode" arguments
will be ignored.

If any of you can see any problems with this change, or can suggest any
improvement to the approach, please respond. I expect to check this change in
within the next few days.

Regards,

Vinay Sajip




More information about the Python-Dev mailing list