I have an Azure Function in .net5 (a.k.a. dotnet-isolated) and I've added Entity Framework like this
services.AddDbContext<EfDbContext>(options =>
{
options.UseSqlServer(context.Configuration[...], builder =>
{
builder.EnableRetryOnFailure();
});
});
When I run the function I see the DB queries from EF in the console (info level judging by the color).
How can I disable them? I tried obvious options in my host.json:
"logging": {
"logLevel": {
"Microsoft.EntityFrameworkCore": "Warning",
}
}
and
"logging": {
"logLevel": {
"default": "Information",
"Microsoft.EntityFrameworkCore": "Warning",
"Microsoft.EntityFrameworkCore.Database": "Warning",
"Microsoft.EntityFrameworkCore.Query": "Warning"
}
}
or even
"logging": {
"logLevel": {
"Microsoft": "Warning",
}
}
but it didn't help. The only option which worked was
"logging": {
"logLevel": {
"default": "Warning",
}
}
Am I missing something?
