-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add rejection tracing to all extractors (#2526) #2584
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Do you wanna update the changelog as well?
e794d7e
to
afebdf2
Compare
Sure. When I added it to the changelog, I realized I'm using the same macro that's used in Do you think it'd be better to change the macro to also (optinally?) take the target as an argument and use |
When I looked at #2527, I realized that this would not work as currently implemented because the macro uses I'll fix this hopefully during today. |
a865a4c
to
7f15001
Compare
I've added I ultimately went this way because By the way, I just noticed that the One way out of this I can think of is using a procedural macro instead which can use To summarize, the options I think are:
I think the first two option give the most options to the users (although I don't know why they'd ever decide to turn on logging for one crate and not the other), with the second option acting in a least surprising way. So if it's ok with you I would also remove the |
7f15001
to
bf26dde
Compare
Removing a feature is a breaking change, even if it does nothing. I agree that we should eventually remove it unless we want to actually make it do something, but please don't outright remove it for now. |
Motivation
Rejection tracing was missing at some points.
Closes #2526
Solution
This should add the tracing eveyrwhere, I searched by
into_response
implementations.I've also changed the places where it already was to call
body_text
only once as it makes an unnecessary copy of the string.