setup_log¶
Import in python using from mcot.core.log import setup_log
-
mcot.core.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
- If .log directory exists: