Error Logging

Models

class fusionbox.error_logging.models.Logged404(*args, **kwargs)

Logged404(id, hash, domain, referer, is_internal, path)

Admin

Middleware

class fusionbox.error_logging.middleware.FusionboxCommonMiddleware(*args, **kwargs)

Impliments django.middleware.commom.CommonMiddleware broken link email messages in a slightly different way. Internal broken links still function the same. External broken links will now only trigger error emails once. All broken links are also logged to the database.

To enable:

  • add fusionbox.error_logging to INSTALLED_APPS add
  • fusionbox.error_logging.middleware.FusionboxCommonMiddleware to MIDDLEWARE_CLASSES
  • in your settings.py set SEND_BROKEN_LINK_EMAILS to False
  • in your settings.py set FUSIONBOX_SEND_BROKEN_LINK_EMAILS to True

This app also registers fusionbox.error_logging.admin.Logged404Admin to the django admin center.

process_response(request, response)

Take over CommonMiddleware’s error reporting for broken links.