繁体   English   中英

如何访问我的 Azure Functions 的日志?

[英]How can I access my Azure Functions' logs?

我的日志 stream 中的日志与我的 Azure Function 应用程序相关联已更改,我相信日志将转到我不确定如何访问它们的其他地方。 这是我收到的新消息的快照:

在此处输入图像描述

有谁知道为什么我的日志变成这样,以及我如何/在哪里可以从正在运行的 function 访问我的日志(似乎运行良好)?

While running the Azure Function, you can see the File System Logs in the Logs Console of the Test/Run Page or Log Stream under Monitoring in the left index menu of the Function App.

AzF-FileSystemLogsRepro

文件系统日志 <- 日志 Stream <- Function 应用程序的监控(左侧索引菜单)

日志流菜单

您可以在与该 Azure Function 应用程序关联的存储帐户中看到所有这些文件系统日志。 Storage Account > File Shares (under Data Storage) > Your Function App > LogFiles > Application > Functions > Host

FileSystemLogFilesinHost

In the path of Storage Account > File Shares (under Data Storage) > Your Function App > LogFiles > Application > Functions > Function > Your Function Name > You can see the console result (Application Logs - Execution results/failed result/error data) function 的。

AppLogsin函数

您可以在 Kudu Explorer 中看到相同的文件/日志以及跟踪(但它提供了来自您的请求和响应日志的最少信息),如第一个 Gif 图像所示。

在我看来,微软已经禁用了 function 应用程序上的日志流,如下所示。

在此处输入图像描述

我能够看到实时日志的唯一方法是 Azure CLI 上的日志尾部,如下所示。

az webapp log tail --resource-group $RESOURCEGROUP --name $FUNCTIONNAME

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM