New submission from Sridhar Ratnakumar <sridh...@activestate.com>: In Formatter.format():
# Cache the traceback text to avoid converting it multiple times # (it's constant anyway) if not record.exc_text: record.exc_text = self.formatException(record.exc_info) The result must ideally be cache on the formatter object (self) itself rather than the record object. Because, record object is reused in multiple handlers .. thus multiple formatters. If the first formatter, caches the traceback text, then subsequent formatters will use the same even though of them is apparently a custom Formatter with overridden `formatException`. ---------- components: Library (Lib) messages: 90247 nosy: srid, vsajip severity: normal status: open title: logging: cache the traceback text on formatter, instead of record versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6435> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com