Not that you need to fix it in this commit, but you can use log.exception() here and it'll do the traceback formatting for you.