[issue29056] logging.Formatter doesn't respect more than one formatException()

Dan Passaro report at bugs.python.org
Fri Dec 23 14:08:59 EST 2016


Dan Passaro added the comment:

Working around this issue can be done by overriding format() in subclasses like so:

    def format(self, record):
        record.exc_text = ''
        try:
            return super().format(record)
        finally:
            record.exc_text = ''

----------

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


More information about the Python-bugs-list mailing list