change_logfile

change_logfile

sorts.profiling.change_logfile(logger, path)[source]

Deletes any previous FileHandler handlers and creates a new FileHandler to the new path with the same level as the previous one.

Parameters
  • logger (logging.Logger) – Logger object.

  • path (str/pathlib.Path) – Path to the logfile output. Can be a file or folder.

  • file_level (int) – Logging level of the file handler.

  • term_level (int) – Logging level of the terminal handler.