Index: Lib/logging/__init__.py =================================================================== --- Lib/logging/__init__.py (revision 58033) +++ Lib/logging/__init__.py (working copy) @@ -247,7 +247,6 @@ self.filename = pathname self.module = "Unknown module" self.exc_info = exc_info - self.exc_text = None # used to cache the traceback text self.lineno = lineno self.funcName = func self.created = ct @@ -420,14 +419,10 @@ record.asctime = self.formatTime(record, self.datefmt) s = self._fmt % record.__dict__ if record.exc_info: - # 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) - if record.exc_text: + exc_text = self.formatException(record.exc_info) if s[-1:] != "\n": s = s + "\n" - s = s + record.exc_text + s = s + exc_text return s #