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

2016-12-27 Thread Dan Passaro
Dan Passaro added the comment: If there's no interest in changing the behavior I'd at least suggest that this caching is mentioned in the docs for the formatException() method specifically, with some kind of attention-grabbing note. (Right now this behavior is only explained in

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

2016-12-23 Thread Dan Passaro
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: recor

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

2016-12-23 Thread Dan Passaro
New submission from Dan Passaro: If two formatters maintain the default implementation of Formatter.format(), but provide custom behavior for Formatter.formatException(), whichever formatException() is called first and returns something truthy is the only formatException() that is used. This is