简体   繁体   English

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

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

The logs in my log stream associated with my Azure Function App have changed and I believe the logs are going somewhere else where I'm not sure exactly how to access them.我的日志 stream 中的日志与我的 Azure Function 应用程序相关联已更改,我相信日志将转到我不确定如何访问它们的其他地方。 Here's a snapshot of the new messages I'm receiving:这是我收到的新消息的快照:

在此处输入图像描述

Would anyone know why my logs changed to be like this and how/where I might be able to access my logs from my running function (seems to running fine)?有谁知道为什么我的日志变成这样,以及我如何/在哪里可以从正在运行的 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. 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

File System Logs <- Log Stream <- Monitoring (Left Index Menu) of the Function App :文件系统日志 <- 日志 Stream <- Function 应用程序的监控(左侧索引菜单)

日志流菜单

All these File System Logs you can see in the Storage Account associated with that Azure Function App.您可以在与该 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) of the function. 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函数

Same Files/Logs you can see in Kudu Explorer along with the traces (but it gives minimum information from your requests and response logs) as shown in the first Gif Image.您可以在 Kudu Explorer 中看到相同的文件/日志以及跟踪(但它提供了来自您的请求和响应日志的最少信息),如第一个 Gif 图像所示。

It looks to me like Microsoft has since disabled log streaming on function apps as shown below.在我看来,微软已经禁用了 function 应用程序上的日志流,如下所示。

在此处输入图像描述

The only way I have been able to see live logs is a log tail on the Azure CLI as below.我能够看到实时日志的唯一方法是 Azure CLI 上的日志尾部,如下所示。

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

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

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