cashocs.log.add_logfile#

cashocs.log.add_logfile(filename: str, mode: str = 'a', level: int = 10) FileHandler#

Adds a file handler to the logger.

Parameters:
  • filename (str) – The path to the file which is used for logging.

  • mode (str, optional) – The mode with which the log file should be treated. “a” appends to the file and “w” overwrites the file. Defaults to “a”.

  • level (int, optional) – The log level used for logging to the file. Defaults to logging.DEBUG.

Returns:

The file handler for the log file.

Return type:

logging.FileHandler