为什么我在 Application Insights 中看不到 "fail" 级别的日志输出?

Why can't I see "fail" level log output in Application Insights?

我在 Log Analytics 中看到其他跟踪记录,但我的应用程序中的异常导致以下内容在本地写入控制台。

fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
      An unhandled exception has occurred while executing the request.
...stack
...lines

我找不到任何高级别...实际上我根本看不到 Microsoft 记录器记录的任何内容。

我有以下配置:

    "Logging": {
        "ApplicationInsights": {
            "LogLevel": {
                "Default": "Warning",
                "MyRootNamespace": "Information"
            }
        },
    ...

我的理解是默认是警告,除了我自己的记录器在信息和更高级别记录。我希望在 Log Analytics 中看到来自 Microsoft 记录器的 Fatal/fail 跟踪。

我错过了什么?

就像彼得指出的那样,未处理的异常应该显示在 exceptions table 中,而不是 traces table.

您可以根据下面的屏幕截图找到 例外情况 table:

如果还有其他问题,请告诉我。