.NET Core 的 Application Insights 仅显示低于 "warning" 的调试级别

Application Insights for .NET Core only shows debug level worse than "warning"

我有一个 .NET Core 2.1 应用程序 (Web API),我在其中为控制台和 ApplicationInsights 添加了日志记录提供程序。
我按照 this article to learn, how the logger works. Later I added ApplicationInsights Provider what I learned from this 示例中的说明进行操作。

我的配置文件是这样的:

  "Logging": {
    "LogLevel": {
      "Default": "Trace"
    }
  },

没有别的。
我希望所有日志消息都显示在 ApplicationInsights 中,但是那里只显示警告消息、错误消息和关键消息。
所有级别 < 警告的日志都不会出现在那里。

如果我为 ApplicationInsights 添加特定的日志级别 "debug",这也不起作用。

知道我可能做错了什么吗?

如果您通读了您发布的文档页面,在子部分

ILogger logs

据说默认的日志记录级别是=< Warning

您将找到有关如何更改最低日志记录级别的官方 Microsoft link here

要更改 Application Insights 的日志级别,您需要做的是像下面这样设置您的配置文件:

{
  "Logging": {
    "LogLevel": {
      "Default": "Warning"
    },
    "ApplicationInsights": {
      "LogLevel": {
        "Microsoft": "Error"
      }
    }
  }
}