如何在没有 Cloud Explorer 的情况下从 Azure 应用服务获取事件日志文件?
How to get event log files from Azure app service without Cloud Explorer?
我有一个 Azure 应用服务。在 Visual Studio 2019 年,我可以这样做以从中获取事件日志:
- 打开 Cloud Explorer window(查看 -> Cloud Explorer)。
- 使用我的 Azure 凭据登录。
- 展开订阅,然后是资源组,然后是应用服务。
- 展开文件夹日志文件
- 双击eventlog.xml下载。
在 Visual Studio 2022 年没有 Cloud Explorer。他们建议我们改用 Azure 存储资源管理器。我无法在存储资源管理器中找到事件日志文件。
有谁知道如何在没有 Visual Studio 2019 的情况下从 GUI 或命令行获取它?
我在这篇 Microsoft 文章中找到了答案:https://docs.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-6.0#troubleshoot-on-azure-app-service
To access the Application Event Log, use the Diagnose and solve problems blade in the Azure portal:
- In the Azure portal, open the app in App Services.
- Select Diagnose and solve problems.
- Select the Diagnostic Tools heading.
- Under Support Tools, select the Application Events button.
- Examine the latest error provided by the IIS AspNetCoreModule or IIS AspNetCoreModule V2 entry in the Source column.
An alternative to using the Diagnose and solve problems blade is to examine the Application Event Log file directly using Kudu:
- Open Advanced Tools in the Development Tools area. Select the Go→ button. The Kudu console opens in a new browser tab or window.
- Using the navigation bar at the top of the page, open Debug console and select CMD.
- Open the LogFiles folder.
- Select the pencil icon next to the eventlog.xml file.
- Examine the log. Scroll to the bottom of the log to see the most recent events.
我有一个 Azure 应用服务。在 Visual Studio 2019 年,我可以这样做以从中获取事件日志:
- 打开 Cloud Explorer window(查看 -> Cloud Explorer)。
- 使用我的 Azure 凭据登录。
- 展开订阅,然后是资源组,然后是应用服务。
- 展开文件夹日志文件
- 双击eventlog.xml下载。
在 Visual Studio 2022 年没有 Cloud Explorer。他们建议我们改用 Azure 存储资源管理器。我无法在存储资源管理器中找到事件日志文件。
有谁知道如何在没有 Visual Studio 2019 的情况下从 GUI 或命令行获取它?
我在这篇 Microsoft 文章中找到了答案:https://docs.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-6.0#troubleshoot-on-azure-app-service
To access the Application Event Log, use the Diagnose and solve problems blade in the Azure portal:
- In the Azure portal, open the app in App Services.
- Select Diagnose and solve problems.
- Select the Diagnostic Tools heading.
- Under Support Tools, select the Application Events button.
- Examine the latest error provided by the IIS AspNetCoreModule or IIS AspNetCoreModule V2 entry in the Source column.
An alternative to using the Diagnose and solve problems blade is to examine the Application Event Log file directly using Kudu:
- Open Advanced Tools in the Development Tools area. Select the Go→ button. The Kudu console opens in a new browser tab or window.
- Using the navigation bar at the top of the page, open Debug console and select CMD.
- Open the LogFiles folder.
- Select the pencil icon next to the eventlog.xml file.
- Examine the log. Scroll to the bottom of the log to see the most recent events.