andes.main.config_logger(stream_level=20, *, stream=True, file=True, log_file='andes.log', log_path=None, file_level=10)[source]#

Configure an ANDES logger with a FileHandler and a StreamHandler.

This function is called at the beginning of andes.main.main(). Updating stream_level and file_level is now supported.

streambool, optional

Create a StreamHandler for stdout if True. If False, the handler will not be created.

filebool, optionsl

True if logging to log_file.

log_filestr, optional

Logg file name for FileHandler, 'andes.log' by default. If None, the FileHandler will not be created.

log_pathstr, optional

Path to store the log file. By default, the path is generated by get_log_dir() in utils.misc.

stream_level{10, 20, 30, 40, 50}, optional

StreamHandler verbosity level.

file_level{10, 20, 30, 40, 50}, optional

FileHandler verbosity level.