For me it would be nice if I could use the same logger for all my requests
coming from gunicorn but now I'm getting only 4XX, 5XX from django and all
requests within gunicorn. I would ideally like to disable gunicorn logging
and just capture all requests coming from django directly.
--
Ticket URL: <https://code.djangoproject.com/ticket/33897>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> What's the rationale behind only logging responses with `django.request`
> if status code is >= 400? Do you think we could make this a setting that
> a user can configure?
>
> For me it would be nice if I could use the same logger for all my
> requests coming from gunicorn but now I'm getting only 4XX, 5XX from
> django and all requests within gunicorn. I would ideally like to disable
> gunicorn logging and just capture all requests coming from django
> directly.
New description:
What's the rationale behind only logging responses with `django.request`
if status code is >= 400? Do you think we could make this a setting that a
user can configure?
For me it would be nice if I could use the same logger for all my requests
coming from gunicorn but now I'm getting only 4XX, 5XX from django and all
requests within gunicorn (ending up with duplicate logs for 4XX & 5XX). I
would ideally like to disable gunicorn logging and just capture all
requests coming from django directly.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/33897#comment:1>
* status: new => closed
* resolution: => wontfix
* component: Utilities => HTTP handling
Comment:
> What's the rationale behind only logging responses with `django.request`
if status code is >= 400?
As far as I'm aware web server logs are appropriate place for logging all
responses. It's not something that must be included in Django itself (see
also #12012 and LoggingProposal).
> Do you think we could make this a setting that a user can configure?
Creating a new setting is always controversial because we already have
plenty of them. Moreover, you can find many 3rd-party packages (e.g.
`django-request-logging`, `django-request`) that will help you to achieve
this. You can also add a custom middleware that will log all responses in
the `django.request` logger.
--
Ticket URL: <https://code.djangoproject.com/ticket/33897#comment:2>