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).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for DjangoRequestLogger-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7762028c5292bce650dd54fdc8baf1219cd807b48191cdd2b039e1ff1c210b20 |
|
MD5 | 555d14c0d6181a5041d8689828dafae8 |
|
BLAKE2b-256 | bd6a0568fab6d944101a3e99fec0447079cfcd487591f653da75748bf26a9a07 |