class_docstr: 重载 StreamHandler 使得替换 sys.stdout 的时候能够生效。
docstr: 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.
docstr_tok: ["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","."]
code: 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 = sys.stdout
          # 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)
  
file_path: fastNLP/fastNLP/core/log/handler.py
imports: import logging
  import sys
  from logging import getLevelName
label_desc: Use image node_id 3 for calling the StdoutStreamHandler obj's underlying member method code with example usage: obj.emit(record) without return types