serilog-extensions-logging
serilog-extensions-logging copied to clipboard
Minimum Logging Level Question
Hi does this extension use the default logging level or do you need to provide it? Finding that it does not seem to use this in aspnet core etc.
ex.
"Logging": { "LogLevel": { "Default": "Warning", ** use this? "System": "Warning", "Microsoft": "Warning" } },
I wanted to to add that for Azure functions its the function name that sets the level, however; there is also a default option.
Hi @kentonbmax ,
To be able to use Microsoft.Extensions.Logging filters you need to put Serilog sub-section:
"Logging": {
"Serilog": {
"LogLevel": {
"Default": "Warning",
...
}
}
and configure Serilog like this:
var logger = new LoggerConfiguration()
.MinimumLevel.Verbose()
...
.CreateLogger();
or completely replace Serilogs configuration via Serilog.Settings.Configuration package
Tried copied your example and tried to get it to work a few ways, but I still get Debug events logged to my sink.
@kentonbmax can you provide a minimal example that reproduce the problem?
Hi, sorry we couldn't answer your question here; if you're still looking for information on this, tagging a Stack Overflow post with the serilog tag will get the right eyes onto it. Hope this helps!