class logging.StreamHandler(stream=None)
Returns a new instance of the StreamHandler
class. If stream is specified, the instance will use it for logging output; otherwise, sys.stderr will be used.
-
emit(record)
-
If a formatter is specified, it is used to format the record. The record is then written to the stream with a terminator. If exception information is present, it is formatted using
traceback.print_exception()
and appended to the stream.
-
flush()
-
Flushes the stream by calling its
flush()
method. Note that theclose()
method is inherited fromHandler
and so does no output, so an explicitflush()
call may be needed at times.
Please login to continue.