log_exception

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

Log exception information to a file, or print to screen

Parameters
LOGFILEstr or None

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

tracebackbuiltin traceback module

Exception traceback, from global import traceback.

verbosebool

Print exception to stdout.

mode‘a’, ‘w’

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