简体   繁体   中英

How to get event log files from Azure app service without Cloud Explorer?

I have an Azure app service. In Visual Studio 2019 I can do this to get event logs from it:

  1. Open Cloud Exlorer window ( View -> Cloud Explorer ).
  2. Log in with my Azure credentials.
  3. Expand subscription, then resource group, then app service.
  4. Expand the folder Log Files
  5. Doubleclick eventlog.xml to download it.

In Visual Studio 2022 there is no Cloud Explorer. They recommend us to use Azure Storage Explorer instead. I have not been able to find the event log file in Storage Explorer.

Does anyone know how to get it without Visual Studio 2019 - either from a GUI or from a command line?

在此处输入图像描述

I found an answer in this Microsoft article: https://learn.microsoft.com/en-us/as.net/core/test/troubleshoot-azure-iis?view=as.netcore-6.0#troubleshoot-on-azure-app-service

To access the Application Event Log, use the Diagnose and solve problems blade in the Azure portal:

  1. In the Azure portal, open the app in App Services.
  2. Select Diagnose and solve problems.
  3. Select the Diagnostic Tools heading.
  4. Under Support Tools, select the Application Events button.
  5. 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:

  1. Open Advanced Tools in the Development Tools area. Select the Go→ button. The Kudu console opens in a new browser tab or window.
  2. Using the navigation bar at the top of the page, open Debug console and select CMD.
  3. Open the LogFiles folder.
  4. Select the pencil icon next to the eventlog.xml file.
  5. Examine the log. Scroll to the bottom of the log to see the most recent events.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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