setup_log¶
Import in python using from mcutils.utils.log import setup_log
-
mcutils.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)
stdout (INFO and higher if debug is False, DEBUG and higher otherwise)
debug defaults to True for submitted job, False otherwise
filename if provided
- Parameters
filename – filename used in the logging (default: only set up logging to stdout/stderr and ~/.log directory)
replace – if True replaces any previous logging