def log_exception(*args, **kwds):
  cls, err = sys.exc_info()[:2]
  logging.exception('Exception in request: %s: %s', cls.__name__, err)
Django signal handler to log an exception.
dataset/ETHPy150Open CollabQ/CollabQ/main.py/log_exception