how to enable error log levels like info, verbose on linux app service

S Nair, Priyanka 0 Reputation points
2025-02-18T10:39:15.02+00:00

Hi,

I want to set the log level to information on Linux App service. I followed the steps as mentioned.

  1. Go to the Azure portal and navigate to your App Service.
  2. Click on "App Service logs" in the left-hand menu.
  3. Under "Application Logging (Filesystem)", I am unable to find the "Log level" dropdown.

Please help me understand why I dont have this dropdown to set the logging level?

Thanks in advance.

Regards,

Priyanka

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,931 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Deepanshukatara-6769 16,565 Reputation points Moderator
    2025-02-18T10:44:33.73+00:00

    Hello Priyanka, Welcome to MS Q&A

    The absence of a 'Log level' dropdown under 'Application Logging (Filesystem)' in Azure App Service logs is likely because the 'Filesystem' option is intended for temporary debugging purposes and does not support the same level of detail as the 'Blob' option. The 'Blob' option allows for a more granular logging configuration, including the ability to select the log level, while the 'Filesystem' option does not provide this capability.

    The Filesystem option is for temporary debugging purposes, and turns itself off in 12 hours. The Blob option is for long-term logging, and needs a blob storage container to write logs to. The Blob option also includes additional information in the log messages, such as the ID of the origin VM instance o

    f the log message (InstanceId), thread ID (Tid), and a more granular timestamp (EventTickCount).

    To enable web server logging for Windows apps in the Azure portal, navigate to your app and select App Service logs.

    For Web server logging, select Storage to store logs on blob storage, or File System to store logs on the App Service file system.

    For more detailed information, you can refer to the following resources:

    Please check and let us know

    Kindly accept if it helps

    Thanks

    Deepanshu

    0 comments No comments

  2. Harshitha Veeramalla 1,301 Reputation points Microsoft External Staff Moderator
    2025-02-20T07:30:54.4666667+00:00

    Hi @S Nair, Priyanka

    why I dont have this dropdown to set the logging level?

    In Portal, Logging option for App Service logs is available only in Windows App Service.

    User's image

    You can set the log Level for Linux app from code or from appsettings.json file.

    • In Program.cs file, you can add filter/set the minimum log level.
    
    builder.Logging.SetMinimumLevel(LogLevel.Information);
    
    
    • In appsettings.json file,

    By default, your web app will have the basic Log Level in the file, you can edit it accordingly.

    {
      "Logging": {
        "LogLevel": {
          "Default": "Information",
          "Microsoft.AspNetCore": "Warning"
        }
      },
      "AllowedHosts": "*"
    }  
    

    Kindly, please "Accept Answer" if the Sol has helped, so that others in the community facing similar issues can easily find the solution.


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.