You are developing a web application hosted on an Azure App Service. You need to enable application logging to the file system and view the log messages in real-time using the Azure CLI. Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
- 1Run the az webapp log config command with the --application-logging true parameter.
- 2Run the az webapp log tail command.
- 3Navigate to the web application URL to generate HTTP traffic.
Answer
First, run the az webapp log config command with the --application-logging true parameter. Second, run the az webapp log tail command. Third, navigate to the web application URL to generate HTTP traffic.
To view application logs in real-time, you must first enable file system application logging by running the configure command with the application-logging flag set to true. Once configured, you run the tail command to start the live log stream, and then perform actions in the application to generate log entries.
Step-by-Step Solution
Key Concept
Enabling and streaming Web App application logs using Azure CLI