Currently, on some errors, tracebacks are manually included in the log message. This patch instead uses the stdlibs logging traceback printing. This allow better log customisation and control.
Additionally, because the call to logging.exception included the traceback in its log message, the traceback was printed twice the logs, as logging.exception always prints the traceback.
I've left the exceptions logged at debug/info as they are, but it seems to me they'd be better off as error level, since we sys.exit() after both anyway,
👍 can you rebase the commits in 1 ? will merge it right after.
Let logging module handle traceback printing
Manually including the traceback in the log msg causes some issues when
interacting with log formats, and in one case was causing the traceback
to be printed twice.