vantage6.common.log.get_file_logger#

get_file_logger(logger_name, file_path, log_level_file=10, log_level_console=30)#

Create a logger that primarily writes to a file.

It overwrites the root logger settings to prevent console logging that is set by default log configuration settings.

Parameters:
  • logger_name (str) – Name of the logger

  • file_path (Path | str) – Path to the log file

  • log_level_file (int) – Log level for file output. Default is logging.DEBUG

  • log_level_console (int) – Log level for console output. Default is logging.WARN

Return type:

logging.Logger