My favorites | Sign in
Project Home Wiki Issues Source
Project Information
Members

django-remotelog

django-remotelog is a simple, pluggable Django application for logging remote messages from the Python logging module's HTTPHandler class in a database.

Installation

  1. Download the app through SVN and add it to your Python path:
  2. svn co http://django-remotelog.googlecode.com/svn/trunk/remotelog remotelog
  3. Add 'remotelog' to your INSTALLED_APPS
  4. INSTALLED_APPS = (
        # ...
        'remotelog',
        # ...
    )
  5. Add the remotelog urls to your urls.py, e.g.:
  6.     url(r'^remotelog/', include('remotelog.urls')),
  7. Go into the Django admin interface and add an entry for the application you want to log
  8. Add a handler to your logger, like so:
  9. import logging
    import logging.handlers
    logger = logging.getLogger('mylogger')
    http_handler = logging.handlers.HTTPHandler(
        'django.app.hostname:port',
        '/remotelog/your_app_slug/log/',
        method='POST',
    )
    logger.addHandler(http_handler)
  10. On the Django side, navigate to /admin/remotelog/logmessage/ to view the log messages

Development sponsored by Caktus Consulting Group, LLC.

Powered by Google Project Hosting