Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #33495 -- Improved debug logging message about adapting handlers for middlewares. #15413

Merged
merged 1 commit into from Feb 9, 2022

Conversation

acjh
Copy link
Contributor

@acjh acjh commented Feb 8, 2022

Ticket: https://code.djangoproject.com/ticket/33495

It's the wrapped handler that's adapted to the wrapping middleware. — Carlton Gibson

The existing log message "Asynchronous middleware ... adapted" contradicts https://docs.djangoproject.com/en/4.0/topics/async/#async-views:

To see what middleware Django has to adapt, you can turn on debug logging for the django.request logger and look for log messages about “Synchronous middleware … adapted”.

This PR changes it to:

- To see what middleware Django has to adapt, you can turn
+ To see what middleware Django has to adapt for, you can turn
  on debug logging for the ``django.request`` logger and look for log
- messages about *"Synchronous middleware ... adapted"*.
+ messages about *"Asynchronous handler adapted for middleware ..."*.

@github-actions
Copy link

github-actions bot commented Feb 8, 2022

Hello @acjh! Thank you for your contribution 💪

As it's your first contribution be sure to check out the patch review checklist.

If you're fixing a ticket from Trac make sure to set the "Has patch" flag and include a link to this PR in the ticket!

If you have any design or process questions then you can ask in the Django forum.

Welcome aboard ⛵️!

@acjh acjh force-pushed the 33495_synchronous_middleware_log branch from 434ceb3 to ca0c78d Compare February 8, 2022 17:28
…s for middlewares.

It's the wrapped handler that's adapted to the wrapping middleware.
@felixxm felixxm changed the title Fixed #33495 -- Improved the debug log for synchronous middleware Fixed #33495 -- Improved debug logging message about adapting handlers for middlewares. Feb 9, 2022
@felixxm
Copy link
Member

felixxm commented Feb 9, 2022

@acjh Thanks 👍 Welcome aboard ⛵

@felixxm felixxm force-pushed the 33495_synchronous_middleware_log branch from ca0c78d to 2d472ad Compare February 9, 2022 11:19
@felixxm felixxm merged commit 2d472ad into django:main Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants