【发布时间】:2022-10-16 00:55:10
【问题描述】:
我正在尝试记录任何启动错误,但日志没有流入应用程序洞察力。我尝试在 program.cs 中配置应用洞察,但仍然没有看到任何日志。
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureLogging(logging =>
{
logging.ClearProviders();
logging.AddApplicationInsights();
logging.SetMinimumLevel(LogLevel.Information);
});
【问题讨论】:
-
你期待什么日志你能提供一些例子吗?
-
我正在尝试查看应用程序启动失败的原因,main 方法或 startup.cs 中的任何异常
标签: asp.net-core .net-core azure-web-app-service asp.net-core-webapi azure-application-insights