config_logger#
- 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()
. Updatingstream_level
andfile_level
is now supported.- Parameters:
- streambool, optional
Create a StreamHandler for stdout if
True
. IfFalse
, 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. IfNone
, 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.
- Returns
- -------
- None