parameters: (self, record)
docstring: Emit a record.
  
          If a formatter is specified, it is used to format the record.
          The record is then written to the stream with a trailing newline.  If
          exception information is present, it is formatted using
          traceback.print_exception and appended to the stream.  If the stream
          has an 'encoding' attribute, it is used to determine how to do the
          output to the stream.
docstring_summary: Emit a record.
docstring_tokens: Emit a record .
function: def emit(self, record):
          """
          Emit a record.
  
          If a formatter is specified, it is used to format the record.
          The record is then written to the stream with a trailing newline.  If
          exception information is present, it is formatted using
          traceback.print_exception and appended to the stream.  If the stream
          has an 'encoding' attribute, it is used to determine how to do the
          output to the stream.
          """
          try:
              msg = self.format(record)
              stream = self.stream
              # issue 35046: merged two stream.writes into one.
              stream.write(msg + self.terminator)
              self.flush()
          except RecursionError:  # See issue 36272
              raise
          except Exception:
              self.handleError(record)
function_tokens: def emit ( self , record ) : try : msg = self . format ( record ) stream = self . stream # issue 35046: merged two stream.writes into one. stream . write ( msg + self . terminator ) self . flush ( ) except RecursionError : # See issue 36272 raise except Exception : self . handleError ( record )