【发布时间】:2021-12-17 01:54:37
【问题描述】:
我想忽略 prod 系统中的某些警告。我得到的等效代码是这样的:
optionsBuilder
.ConfigureWarnings(x => x.Ignore(RelationalEventId.MultipleCollectionIncludeWarning));
是否可以改为在appSettings.Production.json 中设置忽略?
目前是:
"Logging": {
"LogLevel": {
"Default": "Trace",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"Microsoft.EntityFrameworkCore": "Warning",
"IdentityServer4": "Information"
}
},
【问题讨论】:
标签: asp.net-core logging .net-core entity-framework-core