create_loggers

negmas.helpers.create_loggers(file_name: Optional[str] = None, module_name: Optional[str] = None, screen_level: Optional[int] = 30, file_level: Optional[int] = 10, format_str: str = '%(asctime)s - %(levelname)s - %(message)s', colored: bool = True, app_wide_log_file: bool = True, module_wide_log_file: bool = False)logging.Logger[source]

Create a set of loggers to report feedback.

The logger created can log to both a file and the screen at the same time with adjustable level for each of them. The default is to log everything to the file and to log WARNING at least to the screen

Parameters
  • module_wide_log_file

  • app_wide_log_file

  • file_name – The file to export_to the logs to. If None only the screen is used for logging. If empty, a time-stamp is used

  • module_name – The module name to use. If not given the file name without .py is used

  • screen_level – level of the screen logger

  • file_level – level of the file logger

  • format_str – the format of logged items

  • colored – whether or not to try using colored logs

Returns

The logger

Return type

logging.Logger