An enterprise web application is hosted on a Linux-based Azure App Service. A developer needs to configure built-in application logging to capture standard output (stdout) and standard error (stderr) streams to the local filesystem for temporary debugging, and also stream these logs to an Azure Storage account for long-term retention.
Which of the following configurations must the developer perform? (Select two.)
- Run the Azure CLI command: az webapp log config --name myApp --resource-group myRG --docker-container-logging filesystemAnswer
- Configure a Diagnostic Setting on the App Service to send the AppServiceConsoleLogs category to the Azure Storage account.Answer
- CRun the Azure CLI command: az webapp log config --name myApp --resource-group myRG --application-logging filesystem
- DConfigure a Diagnostic Setting on the App Service to send the AppServiceAppLogs category to the Azure Storage account.
Answer
The developer must run the Azure CLI command to configure docker container logging to the filesystem and configure a Diagnostic Setting on the App Service to send the AppServiceConsoleLogs category to the Azure Storage account.
For Linux-based Azure App Services, application logs correspond to stdout and stderr streams. These are enabled on the local filesystem using the docker-container-logging filesystem parameter in the Azure CLI. To archive these logs to a storage account, a Diagnostic Setting must be configured to forward the AppServiceConsoleLogs category.
Step-by-Step Solution
Key Concept
Configuring container console logging and diagnostic settings on Linux-based Azure App Service