Skip to content

Instantly share code, notes, and snippets.

@tldrafael
Created March 5, 2020 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tldrafael/1f6346e39fbdc1df18431a691e588cd9 to your computer and use it in GitHub Desktop.
Save tldrafael/1f6346e39fbdc1df18431a691e588cd9 to your computer and use it in GitHub Desktop.
Example to get traceback info
import traceback
import sys
try:
pass
except Exception as e:
traceback_info = ''.join(traceback.format_exception(*sys.exc_info()))
logger.info(traceback_info)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment