Question

Difficulty: MediumDiagnose and Log App Service Web Apps

You are configuring diagnostic logging for a .NET web application hosted on a Windows-based Azure App Service. You need to capture application trace messages directly to the local filesystem of the App Service for immediate, short-term troubleshooting without utilizing external Azure storage resources or external SDK dependencies. Which of the following describes the behavior of enabling Application Logging (Filesystem) in this scenario?

  1. A
    You must integrate the Application Insights SDK into the application code without specifying a connection string to stream filesystem logs.
  2. B
    The logging configuration automatically provisions a SAS token with full read, write, and delete permissions to write logs directly to a default Azure Storage account.
  3. The filesystem application logging setting is automatically disabled by Azure 12 hours after it is enabled.Answer
  4. D
    The filesystem logging setting remains permanently enabled until you manually disable it, provided the App Service is configured with an App Service plan that supports scaling.

Answer

The filesystem application logging setting is automatically disabled by Azure 12 hours after it is enabled.
The correct answer is correct because Azure automatically disables filesystem application logging for Windows-based App Services 12 hours after enabling it. This behavior prevents the App Service instance's local storage from filling up with log files over time.

Step-by-Step Solution

1
Understand the requirements of the scenario, which specifies capturing trace messages directly to the local filesystem of a Windows-based App Service without external storage or SDK configurations.
Identify that the built-in Application Logging (Filesystem) feature fits these criteria.
This feature writes standard trace output directly to the local virtual file system of the App Service instance.
2
Recall the key behaviors of App Service diagnostic logging.
Understand that filesystem-based application logging on Windows App Services is intended purely for temporary troubleshooting and has an automatic cleanup mechanism.
Azure enforces this to prevent diagnostic logs from exhausting the available local disk space on the App Service VMs.
3
Select the correct option that reflects this built-in constraint.
Determine that the setting is automatically turned off by Azure after 12 hours.
This matches standard Azure App Service behavior for Windows-based instances.

Key Concept

App Service Filesystem Application Logging Behavior and Limits
Estimated Time:1m 30s
Rate this question