How to view the application logs of an azure web app??

Surya Prakash 1 Reputation point
2020-09-14T11:34:59.683+00:00

Hello, we have deployed java based application on to the Linux web app(non-container). Runtime: java 8 and tomcat 8.5. Application is using Log4j for logging. We are able to generate the logs and they are in the path /home/logfiles/applications. Now is there any efficient way of viewing these logs or redirecting them??? We aware of log stream but it is more of a live log streaming. Please suggest a efficient way of viewing the logs or redirecting them to any other services like VMs to view from there.

thanks
Surya.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,877 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 22,401 Reputation points Microsoft Employee
    2020-09-15T16:37:04.887+00:00

    @Surya Prakash , Thanks for posting this question.

    You can use Kudu to view the logs -Linux/container apps: https://<Your-app-name>.scm.azurewebsites.net/api/logs/docker

    You may also leverage App Service diagnostics from Azure Portal for pointers. To access App Service diagnostics, navigate to your App Service app in the Azure portal.
    In the left navigation, click on Diagnose and solve problems – Checkout the tile for “Diagnostic Tools” and “Availability and Performance” > "Application Logs" title.

    24914-image.png

    With the new Azure Monitor integration, you can create Diagnostic Settings (preview) to send logs to Storage Accounts, Event Hubs and Log Analytics.

    2 people found this answer helpful.