You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is common to use typed ILogger<T> in .NET - this will produce category which equals to full type name, so for example ILogger<HttpClient> has category System.Net.Http.HttpClient.
Usually, this should be enough to have Debug level for HttpClient:
I spent quite a lot of time debugging my configuration not realizing this. In addition to wildcards, I propose adding simple support of namespace prefixes as well, which is common in .NET.
It is common to use typed
ILogger<T>
in .NET - this will produce category which equals to full type name, so for exampleILogger<HttpClient>
has categorySystem.Net.Http.HttpClient
.Usually, this should be enough to have
Debug
level forHttpClient
:Yet in order to make this work, wildcards must be used like this:
I spent quite a lot of time debugging my configuration not realizing this. In addition to wildcards, I propose adding simple support of namespace prefixes as well, which is common in .NET.
Framework documentation: Logging in .NET Core and ASP.NET Core.
The text was updated successfully, but these errors were encountered: