Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Django app to add current username, client IP, etc. to logging output.

Project Description

This Django app adds extra fields to log records emitted by the standard Python logging. Currently these include:

  • username - Username of the currently logged in Django user, if any. If no user is logged in the value is “_” (distinct from empty string, which means that the information is not available).
  • client_ip - IP address of the client browser, obtained from REMOTE_ADDR and HTTP_X_FORWARDED_FOR.
  • absolute_url - the absolute URL of the current request, including the query string.
  • raw_post_data - the raw POST data for the current request, if any.

These fields are then available to be used in your logging formatter (see example below). They are also visible in Django Sentry as additional data (if you have Django Sentry installed).

Release History

Release History

This version
History Node

0.2.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
DjangoRequestLogger-0.2.0.tar.gz (4.0 kB) Copy SHA256 Checksum SHA256 Source Aug 10, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting