code: def format(self, record):
          
          if record.exc_info:
              if record.exc_text:
                  if "Stack frames (most recent call first)" not in record.exc_text:
                      record.exc_text = None
          return super(LocalVarFormatter, self).format(record)
docs: Format the specified record as text. Overrides
          :meth:`logging.Formatter.format` to remove cache of
          :attr:`record.exc_text` unless it was produced by this formatter.