Skip to content

File handler

file_handler

Module for handling basically logging to files.

FileHandler

Object for handling basic logging output to files.

__init__

__init__(filename: str, mode: str = 'w+') -> FileHandler

Init a file handler for the specified file.

handle

handle(record: logging.LogRecord) -> bool

Conditionally emit the specified logging record.

Emission depends on filters which may have been added to the handler. Wrap the actual emission of the record with acquisition/release of the I/O thread lock. Returns whether the filter passed the record for emission.