Skip to content

Instantly share code, notes, and snippets.

@dsociative
Created January 26, 2013 19:04
Show Gist options
  • Save dsociative/4643848 to your computer and use it in GitHub Desktop.
Save dsociative/4643848 to your computer and use it in GitHub Desktop.
import logging
import os, sys
def my_excepthook(excType, excValue, traceback, logger=logger):
logger.error("Logging an uncaught exception",
exc_info=(excType, excValue, traceback))
sys.excepthook = my_excepthook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment