-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Missing overrides in LoggingHttpMessageHandler and LoggingScopeHttpMessageHandler #85104
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsBackground and motivationBoth LoggingHttpMessageHandler and LoggingScopeHttpMessageHandler have implementations of:
is needed. RisksNo response
|
Providing implementations for sync paths makes sense. In this case, it doesn't only affect performance, but also the functionality of such handlers. |
@MihaZupan Sure, please find #85143. |
…ssageHandler (#85143) * add missing overrides in LoggingHttpMessageHandler and LoggingScopeHttpMessageHandler (#85104) * Update LoggingUriOutputTests.cs * Update LoggingHttpMessageHandler.cs * Update LoggingScopeHttpMessageHandler.cs * Update LoggingScopeHttpMessageHandler.cs * Update LoggingUriOutputTests.cs * Update LoggingScopeHttpMessageHandler.cs * Update LoggingUriOutputTests.cs * Update LoggingUriOutputTests.cs * Update LoggingUriOutputTests.cs * Update LoggingUriOutputTests.cs * Update LoggingHttpMessageHandler.cs * Update LoggingScopeHttpMessageHandler.cs * Update LoggingHttpMessageHandler.cs * Update LoggingScopeHttpMessageHandler.cs * Update LoggingHttpMessageHandler.cs * Update LoggingHttpMessageHandler.cs * Update LoggingScopeHttpMessageHandler.cs * Code style update * back to private methods * merge with dotnet/runtime (#7)
Background and motivation
Both LoggingHttpMessageHandler and LoggingScopeHttpMessageHandler have implementations of:
protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request!!, CancellationToken cancellationToken)
but they are missing implementations of:
protected internal override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken)
It would be great to see these implementations introduced, as otherwise custom implementation of:
IHttpMessageHandlerBuilderFilter
,HttpHeadersLogValue
,LoggingHttpMessageHandler
LoggingScopeHttpMessageHandler
is needed.
I know that synchronous usage is not expected most of the times, but we've spent quite some time figuring out why we can't turn on those logs in our legacy app migrated to .NET 6 when we tried to figure out how it works.
Risks
No response
The text was updated successfully, but these errors were encountered: