[Alpha] A configurable set of plugins that log various debugging information to the database, and views to review those logs in useful ways.
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
debug_logger
.gitignore
AUTHORS
LICENSE
MANIFEST.in
README.rst
setup.cfg
setup.py

README.rst

Django Debug Logger

The Django Debug Logger is a configurable set of plugins that log various debugging information about the current request/response to the database, and views to display those logs in various useful ways.

Currently, the following plugins are included:

  • SQL queries including time to execute and traceback to where the SQL originated

If you have ideas for other plugins please let us know.

Installation

  1. Add the debug_logger directory to your Python path.

  2. Add the following middleware to your project's settings.py file:

    'debug_logger.middleware.DebugLoggerMiddleware',

    Tying into middleware allows each plugin to be instantiated on request and database logging to happen on response.

  3. Add debug_logger to your INSTALLED_APPS setting.

  4. Run python manage.py syncdb to install the database tables.

Configuration

The Django Debug Logger has one setting that can be set in settings.py:

  1. Optional: Add a tuple called DEBUG_LOGGER_PLUGINS to your settings.py file that specifies the full Python path to the plugin that you want included. This setting looks very much like the MIDDLEWARE_CLASSES setting. For example:

    DEBUG_LOGGER_PLUGINS = (
        'debug_logger.plugins.sql.SQL',
    )
    

    If you have custom plugins you can include them in this way -- just provide the full Python path to your plugins.

TODOs and BUGS

See: http://github.com/robhudson/django-debug-logger/issues

STATUS

Currently very much in the proof of concept phase. While it's working and showing good signs there is much to do with making the "plugins" more "pluggable".

Help or ideas are appreciated.