Question

Difficulty: MediumDiagnose and Log App Service Web Apps

A developer hosts a web application on a Windows-based Azure App Service. To troubleshoot intermittent database connection errors, the developer enables Application Logging (Filesystem) with a level of Verbose. Two days later, the developer notices that new log files are no longer appearing in the filesystem, even though the database connection errors are still occurring. Which of the following explains why the log files are no longer being generated?

  1. Application logging configured to use the local filesystem is automatically disabled by Azure after 12 hours.Answer
  2. B
    The App Service requires a Key Vault access policy to be configured to allow logs to be persistently written to the local storage environment.
  3. C
    The local filesystem logging provider fails to initialize because a valid Application Insights connection string is missing from the configuration settings.
  4. D
    An invalid Key Vault reference syntax within the App Configuration settings causes the logging framework's initialization pipeline to fail silently.

Answer

Application logging configured to use the local filesystem is automatically disabled by Azure after 12 hours.
The correct option is correct because when you enable application logging to the filesystem in Azure App Service, Azure automatically disables this setting after 12 hours. This prevents the local disk space from filling up, especially under verbose logging levels. If persistent logging is required, application logs must be configured to write to Azure Blob Storage.

Step-by-Step Solution

1
Analyze the configured log target and lifetime behavior.
Filesystem-based application logging is identified as the active logging target.
Different log targets in Azure App Service have different behaviors and persistence rules.
2
Recall the built-in limitation for App Service filesystem logs.
Azure App Service enforces a strict 12-hour limit on filesystem-based application logging.
This restriction prevents the local VM filesystem from running out of disk space due to runaway verbose log generation.
3
Evaluate the options against the 12-hour expiration rule.
The option stating that filesystem application logging is automatically disabled after 12 hours is the correct explanation.
This explains why logs stopped appearing after two days, as the logging was turned off by the platform after the first 12 hours.

Key Concept

App Service application logs configured to the local filesystem are temporary and automatically turn off after 12 hours.
Rate this question