apm-agent-dotnet
apm-agent-dotnet copied to clipboard
How to handle differently set log levels in ASP. NET Core and Elastic.Apm?
Right now, there is some ambiguity when specifying log levels for an ASP.NET Core application.
The LogLevel
can be specified via the built-in Logging
node but also via Elastic.Apm
.
{
"Logging": {
"LogLevel": {
"Default": "Warning",
"Elastic.Apm": "Error"
}
},
"AllowedHosts": "*",
"ElasticApm": {
"ServerUrls": "http://localhost:8200",
"LogLevel" : "Trace"
}
}
The goal of this issue is to specify:
- What's happening when both or either of these settings are present.
- What should happen? What's a reasonable user expectation in that case?
- How the
NetCoreLogger
should deal with changes to the log level via central config - How this works together with other logging frameworks (e.g. Serilog).