logging.FileHandler

class logging.FileHandler(filename, mode='a', encoding=None, delay=False)

Returns a new instance of the FileHandler class. The specified file is opened and used as the stream for logging. If mode is not specified, 'a' is used. If encoding is not None, it is used to open the file with that encoding. If delay is true, then file opening is deferred until the first call to emit(). By default, the file grows indefinitely.

close()

Closes the file.

emit(record)

Outputs the record to the file.

doc_python
2016-10-07 17:36:02
Comments
Leave a Comment

Please login to continue.