Understanding Serilog vs Application Insights Log Levels in Optimizely

Vote:
 

Hi everyone,

I'm trying to better understand how logging configuration works in an Optimizely CMS 12 application using Serilog and Application Insights.

Below is a simplified version of our current configuration:

{
  "Serilog": {
    "Using": [ "Serilog.Sinks.Console" ],
    "MinimumLevel": {
      "Default": "Warning",
      "Override": {
        "Microsoft": "Warning",
        "Microsoft.AspNetCore": "Warning",
        "System": "Warning"
      }
    }
  },

  "Logging": {
    "ApplicationInsights": {
      "LogLevel": {
        "Default": "Information",
        "Microsoft": "Warning",
        "Microsoft.Hosting.Lifetime": "Information"
      }
    }
  }
}

Based on this configuration, my understanding is:

  • Serilog is configured with a minimum level of Warning
  • Therefore, only Warning, Error, and Critical logs should be emitted by Serilog
  • This matches what I'm currently seeing in Application Insights (warnings and errors only)

However, in several places in our application we are writing logs like:

_logger.LogInformation("Customer {CustomerId} updated profile", customerId);

These Information logs do not appear in Application Insights.

My questions are:

  1. Is this expected because Serilog's MinimumLevel.Default is set to Warning?
  2. If I want to start seeing Information logs in Application Insights, do I need to change:
    • Serilog:MinimumLevel:Default to Information
    • OR Logging:ApplicationInsights:LogLevel:Default to Information
    • OR both?
  3. Which configuration takes precedence when both Serilog and Application Insights logging settings are present?
  4. What is the exact purpose of the following Serilog override section?
"Override": {
  "Microsoft": "Warning",
  "Microsoft.AspNetCore": "Warning",
  "System": "Warning"
}

My assumption is that these overrides suppress framework-generated logs while allowing application logs to follow the Default level, but I'd like to confirm that understanding.

Has anyone configured Optimizely CMS / Commerce applications with Serilog and Application Insights and can explain how these settings interact?

Additional Question

One more thing I'm trying to understand:

If Information logs are already being generated by the application, is there a way to verify whether they exist in Application Insights even if they're not visible in the standard Logs/Failures views?

For example:

  • Can I use any specific queries to check whether Information logs are being ingested?
  • Is there a specific table (traces, AppTraces, etc.) that I should query?
  • Is there a way to determine whether the logs were filtered out by Serilog before reaching Application Insights versus being stored but hidden by the current view/filter settings?



Thanks in advance!

#342688
Edited, Jun 01, 2026 15:23
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.