I'm using EF Core and it logs quite a few "info" level messages on application start that I want to filter out. The docs imply that a filtering rule specifying a category should match all categories starting with that category (i.e. "Microsoft" matches "Microsoft*".)
My application has the default logging setup via CreateDefaultWebBuilder and so I placed the following in my appsettings.json:
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Warning",
"Microsoft": "Warning"
}
}
Contrary to my expectation, this did not work. However, the following did:
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Warning",
"Microsoft.EntityFrameworkCore.Migrations": "Warning",
"Microsoft.EntityFrameworkCore.Database.Command": "Warning",
"Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager": "Warning",
"Microsoft.EntityFrameworkCore.Infrastructure": "Warning"
}
}
What am I doing wrong? Surely I shouldn't need to list every category explicitly?