-
Notifications
You must be signed in to change notification settings - Fork 208
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
Use IHttpRequestFeature.Path in RequestLoggingMiddleware to log RequestPath #265
Conversation
2.0.0 (Initial) Release
2.1.0 Release
2.1.1 Release
3.0.0 Release
3.1.0 Release
3.2.0 Release
3.4.0 Release
4.0.0 Release
4.1.0 Release
@@ -68,6 +68,11 @@ public class RequestLoggingOptions | |||
/// </summary> | |||
public ILogger Logger { get; set; } | |||
|
|||
/// <summary> | |||
/// |
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.
?
Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
This looks good! One last thought - |
Thanks @nblumhardt ! I update the PR with the suggested name |
Thanks @jarronshih! Sorry to send one last round of requests 😅 but I've had some more time to think about this, and came to the following conclusions:
I think the XDOC for the property might also read more like: What do you think? I'm also happy making these kinds of changes post-merge, if you are out of time for it. Thanks again! |
Hi @nblumhardt thanks for another round of review. I am also on the side to change default to I update the variable name and doc in the last commit. |
Awesome, thanks @jarronshih 👍 |
Why
See #232
RequestPath
usesRawTarget
which includes query data inside.What
IHttpRequestFeature.Path
could be a better choose.To not break the existing behavior, we make a option
RequestLoggingOptions.IncludeRawTargetPath
with default valuetrue
.Demo
Use sample.cs to test