[issue7077] SysLogHandler can't handle Unicode
Remi Broemeling added the comment: I was encountering the logging.handlers.SysLogHandler bug described by Georg Brandl yesterday/today -- it took quite a while to track down the issue as I assumed it would be in either my code or possibly the framework code (Django). I didn't take into account that the issue might well be in Python's core logging library. I've applied the patch (r84222) to my environment and it works, would vote this issue up as needing to be fixed in stable releases of Python ASAP. Not much worse than sporadically failing logging (i.e. if you're logging both UTF and non-UTF log lines). -- nosy: +Remi.Broemeling ___ Python tracker <http://bugs.python.org/issue7077> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7077] SysLogHandler can't handle Unicode
Remi Broemeling added the comment: Attaching UTFFixedSysLogHandler, which is a sub-class of logging.handlers.SysLogHandler. The sub-class re-implements the emit() code to put the BOM in the right place (a re-implementation of r84218 and r84222). Can be used with existing Python codebases as a bug-fixed drop-in-replacement for logging.handlers.SysLogHandler without having to edit the core python module. Just use UTFFixedSysLogHandler instead of logging.handlers.SysLogHandler. Online necessary until such time as the bug-fixes are pulled into stable versions of python. -- Added file: http://bugs.python.org/file18715/utffixedsysloghandler.py ___ Python tracker <http://bugs.python.org/issue7077> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com