grizli.utils.log_exception(LOGFILE, traceback, verbose=True, mode='a')[source]

Log exception information to a file, or print to screen

LOGFILE : str or None

Output file. If None, then force verbose=True.

traceback : builtin traceback module

Exception traceback, from global import traceback.

verbose : bool

Print exception to stdout.

mode : ‘a’, ‘w’

File mode on open(LOGFILE, mode), i.e., append or write.