-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Can the HostingRequestFinishedLog.ToString include the request url too? #10097
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
Comments
This work? #10102 |
@benaadams. That works. Which version will have it? |
Up to ASP.NET team 😄 |
If we take it, 3.0. |
@davidfowl For 2.x, is there any alternative solution? |
You could add your own middleware at the start of the pipeline and then log on the way out; see #5894 (comment) |
@benaadams I know I can add my own middleware at the beginning of the pipeline. But then it will have duplicated logging as the Webhost one that I could not turn off. Moreover, I think the Webhost one provide more accurate elapsed from start to finish. I just want to check if there is a better solution. If not, I can add my own Middleware for now. Thanks all for your help. |
HostingRequestFinishedLog.ToString currently just has the elapsedTime, but not the request URL.
It is easier to match with the Request starting if it can include the URL like this.
In my log files, sometimes it has a few Request finished around the same time and I cannot tell which one is which quickly without spending time to trace back the log.
This HostingRequestFinishedLog class is internal, I cannot find an easy way I can customize it to provide a custom ToString.
The HostingRequestStartingLog and HostingRequestFinishedLog are run in different thread, I cannot use the threadId to match the log.
The text was updated successfully, but these errors were encountered: