You are troubleshooting a web application hosted on a Windows-based Azure App Service named `webapp1` in a resource group named `rg1`. You need to enable application logging to the local file system with a Verbose level, and then view the logs in real-time as they are generated. Which two Azure CLI commands should you run to meet these requirements?
- az webapp log config --name webapp1 --resource-group rg1 --application-logging true --level verboseAnswer
- az webapp log tail --name webapp1 --resource-group rg1Answer
- Caz webapp log config --name webapp1 --resource-group rg1 --web-server-logging storage --storage-container-url "https://mystorage.blob.core.windows.net/logs"
- Daz monitor app-insights component update --app webapp1 --resource-group rg1
Answer
To resolve the logging requirement, run the command to configure application logging with a verbose level to true, and then use the log tail command to stream the logs in real-time.
The correct actions are to enable application logging to the filesystem with the log config command using the verbose level, and then to stream the logs in real-time by using the log tail command.
Step-by-Step Solution
Key Concept
Enabling and streaming local file system application logs for Azure App Service Web Apps using the Azure CLI.