# Elastic APM not showing debug logs

**URL:** <https://discuss.elastic.co/t/elastic-apm-not-showing-debug-logs/374843>\
**Category:** APM\
**Created:** [February 21, 2025, 8:16am UTC](https://discuss.elastic.co/t/elastic-apm-not-showing-debug-logs/374843 "2025-02-21T08:16:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Milcho](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@Milcho](https://discuss.elastic.co/u/Milcho)\
**Post date:** [February 21, 2025, 8:16am UTC](https://discuss.elastic.co/t/elastic-apm-not-showing-debug-logs/374843/1 "2025-02-21T08:16:47Z")

</div>

We are using Serilog but have recently added Elastic APM as we will be logging to Kibana. But with the addition of Elastic APM we can no longer view logs with log level debug. This goes for the local txt log file, the console and Kibana. The application is written in .Net 8. I have configured the log level to debug at every possible step I could find, but nothing works.  
We are using the latest setup per the [documentation](https://www.elastic.co/guide/en/apm/agent/dotnet/current/setup-dotnet-net-core.html), but have also tried the [deprecated version](https://www.elastic.co/guide/en/apm/agent/dotnet/current/setup-asp-net-core.html) with no luck.

appsettings.json

```auto
"Serilog": {
  "Using": [
    "Serilog.Sinks.Console",
    "Serilog.Sinks.File",
    "Serilog.Enrichers.CorrelationId"
  ],
  "MinimumLevel": {
    "Default": "Debug",
    "Override": {
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information",
      "System": "Warning",
      "Elastic.Apm": "Debug"
    }
  },
  "WriteTo": [
    {
      "Name": "Console",
      "Args": {
          "restrictedToMinimumLevel": "Debug"
        }
      },
      {
        "Name": "File",
        "Args": {
          "path": "Logs/Application.log",
          "restrictedToMinimumLevel": "Debug"
        }
      }
  ],
...
"ElasticApm": {
  "CloudProvider": "none",
  "VerifyServerCert": false,
  "CaptureBody": "all",
  "Instrument": "true",
  "ErrorOnAbortedRequests": "true",
  "ServiceName": "ApplicationName",
  "DisableMetrics": "system.cpu.total.norm.pct, system.process.cpu.total.norm.pct",
  "LogLevel": "Debug"
},
"Logging": {
  "LogLevel": {
    "Default": "Debug",
    "Microsoft.AspNetCore": "Warning",
    "Elastic.Apm": "Debug"
  }
}

```

We are then using the following configuration for the logger.

```auto
var loggerConfiguration = new LoggerConfiguration()
    .Enrich.FromLogContext()
    .Enrich.WithProperty("Environment", environment.EnvironmentName)
    .Enrich.WithProperty("Application", configuration["ElasticApm:ServiceName"])
    .MinimumLevel.Debug()
    .WriteTo.Console()
    .WriteTo.Elasticsearch(new[] { new Uri(configuration["Elastic:Url"]!) }, options =>
    {
        options.DataStream = new DataStreamName(
            "logs",
            configuration["ElasticApm:ServiceName"]!,
            environment.EnvironmentName.ToLower());
    }, transport =>
    {
        transport.Authentication(new ApiKey(configuration["Elastic:ApiKey"]!));
        transport.ServerCertificateValidationCallback((o, certificate, chain, errors) => true);
    });

```

As you can see, we have the debug level set at multiple places, and per the [documentation](https://www.elastic.co/guide/en/apm/agent/dotnet/current/configuration-on-asp-net-core.html) it should be enough to only set it in either "Logging:LogLevel:Default", "Logging:LogLevel:Elastic.Apm" or "ElasticApm:LogLevel". But since neither of these actually show the result, I have tried in further places. I could not find any information as to solve this and hope I can find some assistance in this forum.  
Any help is greatly appreciated, please let me know if any further information is needed. Thank you.
