Overview of django-structlog
maindjango-structlog is a structured logging integration for Django projects using structlog. It enhances standard logging by producing cohesive metadata (such as request_id and user_id) on every log entry, making it significantly easier to track events or incidents across logs.
Supported Integrations
- Django REST framework: Supported by default. Note that when using
TokenAuthentication(or other DRF authentications),user_idwill only appear inrequest_finishedandrequest_failedlogs rather than every log entry. - django-ninja: Supported by default.
- Celery: Requires additional configuration (see specific Celery documentation).