How to configure the logging level for AppServiceAppLogs

Tobias Laving 1 Reputation point
2023-12-14T11:58:46.81+00:00

Hello,

I recently setup our AppService to forward App Service Application Logs to a monitor workspace
However, I don't understand how to tweak the logging level?
I am currently configurating logging in appsettings, but for some reason there is a bunch of "debug" logs in the workspace, despite the default being "warning"

App console logs are respecting the level set in appsettings.

Any idea how to set this up?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,804 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,902 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SwathiDhanwada-MSFT 17,556 Reputation points
    2023-12-14T12:26:57.87+00:00

    @Tobias Laving To configure the logging level for AppServiceAppLogs in Azure App Service, you can follow these steps:

    Go to the Azure portal and navigate to your App Service.

    Click on "App Service logs" in the left-hand menu.

    Under "Application Logging (Filesystem)", select the "Log level" dropdown and choose the desired logging level. The available logging levels are "Error", "Warning", "Information", "Verbose", and "Off".

    Click on "Save" to save the changes.

    Note that the logging level you choose will affect the amount of data that is logged and can impact the performance of your application. It is recommended to use the "Information" or "Warning" logging level for most scenarios, and only increase the logging level to "Verbose" or "Debug" when troubleshooting specific issues.

    Also, keep in mind that the logs generated by AppServiceAppLogs are stored in the file system of your App Service instance. You can access these logs using FTP or the Kudu console. Alternatively, you can configure your App Service to send the logs to a storage account or other logging service for centralized logging and analysis.