{"categories":[{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content/3"}],"enrichment":{"capability":"A Django middleware that logs HTTP request and response payloads with color-coded output, supporting both web and API requests with configurable detail levels and sensitive header masking.","skillfed_tags":["django-middleware","request-logging","debugging"],"use_cases":["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\u2014disable colorization for file logging, adjust log levels for 4xx errors."],"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.\n\nThe package is designed to work with both traditional web requests and API calls, and provides settings to customize behavior globally\u2014including 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'.","worth_installing":"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."},"id":"django-request-logging","links":{"html":"https://skillfed.io/packages/django-request-logging","md":"https://skillfed.io/packages/django-request-logging.md","pypi":"https://pypi.org/project/django-request-logging/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2022-02-23","license_spdx":null,"license_treatment":"permissive","name":"django-request-logging","python_support":"unspecified","summary":"Django middleware that logs http request body."},"popularity":{"monthly_downloads":184002,"position":10051,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.7.5"}
