fitbenchmarking.utils.log module

Utility functions to support logging for the fitbenchmarking project.

fitbenchmarking.utils.log.get_logger(name='fitbenchmarking')

Get the unique logger for the given name. This is a straight pass through but will be more intutive for people who have not used python logging.

Parameters:

name (str, optional) – Name of the logger to use, defaults to ‘fitbenchmarking’

Returns:

The named logger

Return type:

logging.Logger

fitbenchmarking.utils.log.setup_logger(log_file='./fitbenchmarking.log', name='fitbenchmarking', append=False, level='INFO')

Define the location and style of the log file.

Parameters:
  • log_file (str, optional) – path to the log file, defaults to ‘./fitbenchmarking.log’

  • name (str, optional) – The name of the logger to run the setup for, defaults to fitbenchmarking

  • append (bool, optional) – Whether to append to the log or create a new one, defaults to False

  • level (str, optional) – The level of error to print, defaults to ‘INFO’