Django Exception Logging Middleware
January 26, 2011
Here's some middleware that will log any exceptions raised to a file on disk.
import traceback import socket import warnings import md5 from datetime import datetime class CrashLogMiddleware(object): def process_exception(self, request, exception): server_name = socket.gethostname() tb_text = traceback. …