You are troubleshooting an application error on a Windows-based Azure App Service named `marketing-prod` in a resource group named `marketing-rg`.
You need to perform the following tasks:
1. Enable verbose-level application logging to the file system.
2. Monitor the log messages in real-time as they occur.
3. Generate telemetry by sending HTTP requests to the application.
4. Download the historical log files locally for offline review.
Which sequence of Azure CLI commands and actions should you perform? To answer, arrange the actions in the correct order.
- 1Run `az webapp log config --name marketing-prod --resource-group marketing-rg --application-logging true --level verbose`
- 2Run `az webapp log tail --name marketing-prod --resource-group marketing-rg`
- 3Send HTTP requests to the web application endpoint to trigger the application logic.
- 4Run `az webapp log download --name marketing-prod --resource-group marketing-rg`
Answer
First, configure the application logging to the file system with verbose level. Second, start the log tail stream to listen for logs. Third, make HTTP requests to generate log data. Finally, download the consolidated logs using the Azure CLI.
The correct sequence begins by configuring the App Service to log application traces to the filesystem at a verbose level. Next, starting the log stream ensures that the developer can monitor incoming events in real-time. Tailing must occur before sending requests so that transient startup log entries are not missed. Once the stream is active, generating traffic triggers the application logic and records the diagnostic information. Finally, downloading the log files aggregates all of the persistent log data for deep offline analysis.
Step-by-Step Solution
Key Concept
Azure App Service built-in diagnostic logging and log streaming lifecycle via Azure CLI