django-request-logging
Django middleware that logs http request body.
Decision gist · record as of 2026-08-14
Yes, if you are on a stable Django version and accept the maintenance risk. The package is simple, low-friction to install, has no security vulnerabilities, and solves a real debugging need. However, it is dormant (last release February 2022) and may not work with Django versions released after that date. Verify compatibility with your Django version before committing to it.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django to be installed and configured; middleware must be added to MIDDLEWARE tuple in settings.
- Installation is straightforward with low friction—a single runtime dependency on Django and a wheel distribution.
- However, the package is dormant: last release was in February 2022, with no recent commits despite the repository remaining active.
License · maintenance · safety
MIT (permissive) — MIT license is permissive and imposes no restrictions on use, modification, or distribution in commercial or private projects.
last release 2022-02-23 (1633 days) · last repo commit 2024-08-12 · 287 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 184,002 downloads/mo, #10,051 on PyPI
Alternatives
Verify before relying
pip install django-request-logging
# In Django settings.py MIDDLEWARE:
MIDDLEWARE = (
'request_logging.middleware.LoggingMiddleware',
)
# Configure logging:
LOGGING = {
'loggers': {
'django.request': {
'level': 'DEBUG',
},
},
}- Current compatibility with Django versions released after February 2022.
- Whether the package works reliably with modern Python versions beyond those tested at release.
What it is and what it does
django-request-logging is a Django middleware that intercepts HTTP requests and responses, logging their payloads with color-coded output for easier debugging. It logs request headers, body, and response content, with automatic log-level escalation for 400-599 status codes. The middleware supports fine-grained control via a @no_logging decorator for views handling sensitive data, allowing per-view configuration of what gets logged (headers, body, response, or none). It also masks sensitive headers like HTTP_AUTHORIZATION by default and respects Django's standard logging configuration.
The package is designed to work with both traditional web requests and API calls, and provides settings to customize behavior globally—including max body length (default 50000 characters), colorization, log levels, and which headers to redact. Installation requires only adding the middleware to Django's MIDDLEWARE tuple and configuring a logger for 'django.request'.
Use it for
- Debug API requests and responses during development by viewing colored, structured logs of payloads.
- Audit HTTP traffic in staging or production by logging request/response bodies with automatic sensitive-header masking.
- Exclude logging from views handling passwords or tokens using the @no_logging decorator to prevent credential leaks.
- Troubleshoot client integration issues by examining logged request headers and response content without code changes.
- Customize log verbosity per environment—disable colorization for file logging, adjust log levels for 4xx errors.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are on a stable Django version and accept the maintenance risk.
The package is simple, low-friction to install, has no security vulnerabilities, and solves a real debugging need. However, it is dormant (last release February 2022) and may not work with Django versions released after that date. Verify compatibility with your Django version before committing to it.
Install
django-request-logging on PyPI
Before you install
Installation is straightforward with low friction—a single runtime dependency on Django and a wheel distribution. However, the package is dormant: last release was in February 2022, with no recent commits despite the repository remaining active. Use only if you accept that bugs and compatibility issues may not be addressed.
Requires Django to be installed and configured; middleware must be added to MIDDLEWARE tuple in settings.
License in practice
MIT license is permissive and imposes no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install django-request-logging
# In Django settings.py MIDDLEWARE:
MIDDLEWARE = (
'request_logging.middleware.LoggingMiddleware',
)
# Configure logging:
LOGGING = {
'loggers': {
'django.request': {
'level': 'DEBUG',
},
},
}
Verify before relying
- Current compatibility with Django versions released after February 2022.
- Whether the package works reliably with modern Python versions beyond those tested at release.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageDjango |
| Maintenance | Dormant 1,633 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 184,002 / month, #10,051 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: django_request_logging-0.7.5-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “django request logging middleware”
- django-request-loggingA Django middleware that logs HTTP request and response payloads with…
- django-datadog-loggerIntegrates Django applications with Datadog logging by providing…
- django-request-idAttaches a unique request ID to each Django HTTP request and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Dynamic Content packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Soupsieve is a CSS selector library designed to work with Beautiful Soup 4 to select, match, and filter HTML and XML elements using modern CSS selectors from CSS level 1 through CSS level 4 specifications.
Install it if you use Beautiful Soup for HTML or XML parsing and want modern CSS selector support.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
Flask is a lightweight WSGI web application framework for building web applications in Python, from simple single-page sites to complex multi-route applications.
Mako compiles Python-embedded templates into Python modules for fast rendering, supporting layout inheritance, custom functions, and direct Python expressions within template syntax.
See also drf-api-logger · django-log-request-id · django-log-formatter-asim · django-cors-headers · django-permissions-policy · django-cid · asgi-correlation-id · django-annoying · Autologging · django-csp