"Web server logging" supported for App services

Rachana Pole 10 Reputation points
2024-12-30T07:06:32.6866667+00:00

Hi team,

I want to know how to enable HTTP logging for all types of Azure App services.

I believe we need to enable "Web server logging" under "App Service logs" but Currently I see this option only for "Logic apps" and not available for "Function app" or "Web apps" on UI. But I am able to configure it via REST API for all types.

Can you please share details on :

  1. Is "web server logging" still supported for all types of app services?
  2. If yes, how can we enable all app services? Also, provide the Azure documentation for steps.
  3. If not, what is the alternate configuration? Also, provide the Azure documentation for the support details and steps.
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,934 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Shree Hima Bindu Maganti 4,775 Reputation points Microsoft External Staff Moderator
    2025-01-02T17:58:15.5666667+00:00

    Hi Rachana Pole
    Thankyou for your Response.
    The --web-server-logging parameter in Azure CLI does not support storage as a value. Allowed values are off and filesystem.
    Enable Logging to Filesystem
    az webapp log config --name <app-name> --resource-group <resource-group> --web-server-logging filesystem
    Disable Logging
    az webapp log config --name <app-name> --resource-group <resource-group> --web-server-logging off

    API Endpoint
    https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{appName}/config/logs?api-version=2021-01-01
    Request Body

    {
      "properties": {
        "httpLogs": {
          "azureBlobStorage": {
            "enabled": true,
            "sasUrl": "<sas-url-for-blob-storage>",
            "retentionInDays": 7
          }
        }
      }
    }
    

    Generate a SAS token for your Blob Storage container and replace <sas-url-for-blob-storage> with the full URL.

    https://learn.microsoft.com/en-us/cli/azure/webapp/log?view=azure-cli-latest
    https://learn.microsoft.com/en-us/azure/app-service/monitor-app-service
    https://learn.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas
    If the answer is helpful, please click Accept Answer and kindly upvote it

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.