You are developing a web application named webapp1 hosted on a Windows-based Azure App Service in resource group rg1. During a testing phase, you need to diagnose startup crashes by enabling filesystem-based application logging, establishing a real-time log monitoring pipeline, triggering runtime execution, and obtaining the complete diagnostic log archive for offline verification. Which sequence of actions should you perform? Arrange the actions in the correct order.
- 1Run `az webapp log config --name webapp1 --resource-group rg1 --application-logging true --level error` to configure the diagnostic log settings.
- 2Run `az webapp log tail --name webapp1 --resource-group rg1` to establish a live log streaming session in your terminal.
- 3Send HTTP requests to the web application URL to trigger runtime execution and generate the diagnostic trace logs.
- 4Run `az webapp log download --name webapp1 --resource-group rg1` to retrieve the historical zip package containing persistent log directories.
Answer
First, configure application logging to the file system using the `az webapp log config` command. Next, start the live log stream with `az webapp log tail`. Following that, make HTTP requests to the web application to generate traffic and write to the logs. Finally, download the historical log archive using `az webapp log download`.
The correct order proceeds from configuring the underlying log system, setting up the observer stream, triggering the target event, and finally downloading the persistent historical records. File-system application logging must first be enabled because it is disabled by default. Running the tail command next ensures that any live events generated during the subsequent HTTP requests are captured in the terminal stream. Finally, downloading the log bundle retrieves the full persistent log folder for subsequent analysis.
Step-by-Step Solution
Key Concept
Azure App Service Application Diagnostics and CLI Logging Commands
Estimated Time:2m 0s