create_loggers
- negmas.helpers.create_loggers(file_name=None, module_name=None, screen_level=30, file_level=10, format_str='%(asctime)s - %(levelname)s - %(message)s', colored=True, app_wide_log_file=True, module_wide_log_file=False)[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 (
bool
)app_wide_log_file (
bool
)file_name (
str
|None
) – The file to export_to the logs to. If None only the screen is used for logging. If empty, a time-stamp is usedmodule_name (
str
|None
) – The module name to use. If not given the file name without .py is usedformat_str (
str
) – the format of logged itemscolored (
bool
) – whether or not to try using colored logs
- Returns:
The logger
- Return type: