code: def emit(self, record):
          
          
          try:
              self.mailer.new(plain=self.format(record)).send()
          
          except (KeyboardInterrupt, SystemExit):
              raise
          
          except:
              self.handleError(record)
docs: Emit a record.