簡體   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