> Use the almost undocumented `exc_info=True`
Why not simply use logger.exception()?
try:
do_thing()
except Exception:
logger.exception("It broke.")
Called from within an exception handler, logger.exception() automatically includes exception information.