I have an Azure app service. In Visual Studio 2019 I can do this to get event logs from 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/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.