Application Insights - Log Level
🤦 I’ve been using ApplicationInsights for a few years now, but only now have I had a real need to look for my own custom logs there. It took me a while to figure out why I can’t find them there.
🤔 It’s not enough to set the generic “LogLeve:Default” to “Information” (Debug, Trace), because by default the ApplicationInsights provider only pushes logs with severity Warning and higher to AppInsights anyway.
💡 In order to push them there you need to explicitly set “ApplicationInsights:LogLevel:Default:” to “Information” (Debug, Trace).
🤞 Maybe this will help you sometime too.
{
"Logging": {
"LogLevel": {
"Default": "Information"
},
// 👇 This section is important
"ApplicationInsights": {
"LogLevel": {
"Default": "Information"
}
}
},
"ApplicationInsights": {
"ConnectionString": ""
}
}