You host a containerized ASP.NET Core web application on a Linux-based Azure App Service. You must implement a diagnostic logging solution that routes all runtime standard output (stdout) and standard error (stderr) logs to an Azure Storage account. The logs must be retained permanently for compliance auditing, and the logging mechanism must not automatically deactivate over time. Which configuration should you implement?
- AEnable Application Logging (Blob) under the App Service logs settings, select the target storage container, and define the retention policy.
- BCreate a diagnostic setting for the App Service, select the AppServiceAppLogs log category, and configure the destination to archive to your Azure Storage account.
- Create a diagnostic setting for the App Service, select the AppServiceConsoleLogs log category, and configure the destination to archive to your Azure Storage account.Cevap
- DEnable Application Logging (Filesystem) in the App Service logs settings, set the log level to Verbose, and configure the application settings to use the Storage account connection string.
Cevap
Create a diagnostic setting for the App Service, select the AppServiceConsoleLogs log category, and configure the destination to archive to your Azure Storage account.
For Linux-based App Services, the container's standard output (stdout) and standard error (stderr) streams are the primary source of application logs. These streams are captured by the AppServiceConsoleLogs category in Azure Monitor diagnostic settings. To ensure persistent, long-term retention that doesn't expire, you must configure a diagnostic setting to forward these logs to a storage account. This bypasses the 12-hour limit associated with filesystem logging.
Adım Adım Çözüm
Anahtar Kavram
Configuring persistent logging for Linux-based Azure App Services using Azure Monitor diagnostic settings and the AppServiceConsoleLogs category.