Nick Coghlan <ncoghlan <at> gmail.com> writes: > My other question is whether or not it would be worth having the logging > module able to export it's *current* configuration in dictionary form. I > don't have a use case other than that it might be useful for debugging > logging configuration errors when attempting to combine multiple sources > of logging data, but it's worth considering. >
One restriction on any output of the current configuration is that it may not be suitable for round-tripping, i.e. you may not be able to use the output dict to (re)configure the system. That's because in general, the configurator wants to know how to instantiate handlers, filters, formatters and so it essentially needs the constructor arguments in an incoming dict. However, there's no requirement for the handlers, filters and formatters to keep those constructor arguments around in the original form; and so, in the general case, they are not available to output in a dict describing the current configuration. Regards, Vinay Sajip _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com