mcot.utils.log¶
Functions
Returns the requested log level. |
|
|
Sets up the logger to log to the given filename. |
get_level¶
setup_log¶
-
mcot.utils.log.
setup_log
(filename=None, replace=True)[source]¶ Sets up the logger to log to the given filename.
Sets up logging to:
If .log directory exists:
~/.log/python.info (INFO and higher)
~/.log/python.debug (DEBUG and higher)
stderr (minimum level is set by MCLOG; default values are DEBUG if submitted, INFO otherwise)
filename if provided
- Parameters
filename – filename used in the logging (default: only set up logging to stdout/stderr and ~/.log directory)
replace – if replace is True, replace the existing handlers