You are troubleshooting a Python web application deployed on a Linux-based Azure App Service named my-app in a resource group named my-rg. The application fails during the startup phase, and you need to enable container stdout/stderr logging to the filesystem and then view the live log stream in your local terminal. Which two of the following Azure CLI commands must you run?
- az webapp log config --name my-app --resource-group my-rg --docker-container-logging filesystemAnswer
- az webapp log tail --name my-app --resource-group my-rgAnswer
- Caz webapp log config --name my-app --resource-group my-rg --application-logging true
- Daz webapp log download --name my-app --resource-group my-rg
Answer
Enable container filesystem logging using the command with the --docker-container-logging filesystem flag, and stream the logs using the tail command.
To troubleshoot startup errors on a Linux-based App Service, you must configure container logging to the filesystem using the --docker-container-logging parameter and then use the log tail command to establish a live diagnostic connection.
Step-by-Step Solution
Key Concept
Configuring container logging and streaming logs for Linux-based App Services using the Azure CLI.