Get Azure App Service deployment logs from KUDU

If you are performing a deployment and it is not working, working only after some effort or it’s not working as expected, one feature that might help you find the reason is the deployment log available using KUDU.

You can access your deployment details by entering https://***.scm.azurewebsites.net (where *** is the site name of your Microsoft Azure App Services Web App). Using your Deployment credentials to login, you can click on the Deployments link, as shown in Figure 1, to download a JSON file containing your deployment logs, shown in Figure 2. If the issue is happening on the Azure Website side, then the error is likely logged here which might lead you to a solution. If there is no logged error, then the issue may be happening before the request reaches the Microsoft Azure platform. In this case you want to focus your effort on the deployment platform.

image

Figure 1, Downloading Microsoft Azure App Service Web App deployment logs using Kudu

image

Figure 2, Example of a Microsoft Azure App Service Web App deployment log generated by Kudu

If you do not find any reference to errors or issues in this log, you can also check the TRACE.XML file which is written when a GIT deployment is performed. You can get the TRACE.XML file by using an FTP client and navigating to the /LogFiles/Git/trace directory, then download it locally for analysis. Figure 3 illustrates how this might look in the FTP client.

image

Figure 3, Example of a Microsoft Azure App Service Web App trace log

It is also possible to download the TRACE.XML file from KUDU by using the Debug console and navigating to the same directory stated above for the FTP client. See Figure 4 which illustrates how to navigate to the Debug console and how to download the TRACE.XML file.

image

Figure 4, Download the trace.xml file from KUDU to troubleshoot deployment problems

If you are having problems with a deployment, you should be able to find something in either of these logs that highlight the issue. If you do not have a support contract, then you can place the error in the Microsoft Azure App Services forums here and someone may be able to help you.