These requirements are installed automatically by pip and easy_install, and are in the included requirements.pip file.

Django Debug Toolbar - This project is designed to work alongside the Django Debug Toolbar and extend its functionality to support logging.

Picklefield - Used to saved pickled versions of settings, sql queries, and cache calls to the database.


Before you begin, make sure Django Debug Toolbar is configured and working properly.

Install the project with pip:

$ pip install django-debug-logging

This should install django-picklefield as well, which is needed.

Next, you’ll add debug_logging to your INSTALLED_APPS:


Now, you’ll need to replace the standard DebugToolbarMiddleware with a middleware that extends it to add logging functionality. The toolbar will still function normally when logging is disabled.

From your MIDDLEWARE_CLASSES setting, remove:


Replace it with:


Now, you’ll need to replace a few of the panels with extended versions that support logging. If you don’t want the data from any one of these panels to be logged, you can skip it.

From your DEBUG_TOOLBAR_PANELS setting, remove:


Replace them with:


There are also a couple of panels that are unique to Django Debug Logging that you may find convenient when logging data over time. If you’d like, you can add them to your DEBUG_TOOLBAR_PANELS setting:


Add the debug logging urls to your

urlpatterns = patterns('',
    url(r'^debug-logging/', include('debug_logging.urls')),

The Debug Logger will ignore requests made to this frontend interface, so your log won’t be clogged with information you have no use for.

Finally, run syncdb to create the models for statistic logging:

$ python syncdb

South migrations are included in case migrations are needed when upgrading to new versions.


Requests are logged when they contain a ‘DJANGO_DEBUG_LOGGING’ header set to True. This header is added automatically by the ‘log_urls’ command when it is used. To prevent any performance impact from the rendering of the Debug Toolbar, it is not shown when this header is present.

For the best results, don’t use the site while a test run is in progress.