@receiver(got_request_exception)
def record_request_exception(sender, **kwargs):
 logging.exception('Uncaught exception from {sender}'.format(sender=sender))

@ receiver ( got_request_exception ) def record_request_exception ( sender , ** kwargs ) : logging . exception ( 'Uncaught exception from {sender}' . format ( sender = sender ) )
logs the stack trace whenever an exception occurs in processing a request .