New submission from Philip Jenvey <[EMAIL PROTECTED]>: Python 2.5 added support for specifying a custom logging Formatter class in logging configuration files. Handler classes can also be specified, but your choice is limited to classes that live in the logging module.
A current workaround this is to manually add your custom Handler class to the logging module prior to loading the logging config file, but then you're no longer driving logging configuration purely from a config file (which is the entire point). This is particularly important for apps that are driven entirely from a config file that also includes logging information (such as Pylons applications) The following patch will cause Handler classes to be resolved just like Formatter classes if the check for the Handler class in the logging module fails. FYI this patch has been used in Paste (in particular for Pylons apps) for over a year so I consider it stable ---------- components: Library (Lib) files: logging-custom-Handler_r65033.diff keywords: patch messages: 69858 nosy: pjenvey, vsajip severity: normal status: open title: [PATCH] Allow custom logging Handlers in logging config files type: feature request versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10921/logging-custom-Handler_r65033.diff _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3389> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com