Download Azure App Services Web App log files from Visual Studio


I wrote an article about the ability to enable Web Server Logging, Detailed Error Message, Failed Request Tracing and Application Logging here.  In that article I discussed that you can download the logs using an FTP tool like FIlezilla. You can also download the log files from within Visual Studio by performing the following.  I currently have the Windows Azure SDK 2.1 installed, expand the Azure App Service Web Apps menu item within Server Explorer, then expand the subscription and right-click on the web site you want to down load the logs for.  Lastly, click on the View Settings… menu item shown in Figure 1.

Figure 1, View Azure App Services Web Apps details in Visual Studio

By default this opens a window showing the current configurations applied to the selected web site.  Figure 2 illustrates this.

Figure 2, Azure App Service Web App configuration page in Visual Studio

Notice that there is also a Logs item feature available for use.  Clicking the item renders the page similar to that shown in Figure 3.

Figure 3, Download Logs from a an Azure App Service Web App using Visual Studio

Notice that there are 3 available options.

  • Stream Logs – By placing System.Diagnostics.Tracing code into your application, once deployed to the Microsoft Azure platform, you can watch, in real time, when that piece of code is executed.  More information about that can be found here and in my book.
  • Download Logs – Clicking on this link will download the data stored into the LogFiles directory of the Web Site as a ZIP file.
  • Configure Logging – Opens a browser and navigates to the CONFIGURE feature for the selected Windows Azure Web Site.

There is also an option to enable the Diagnostics on the Web Site.  This supports the viewing of events logged into the event viewer or custom events.  This feature requires the linking of a storage resource to the web site and the configuration of the Site Diagnostics to be configured to store the log into a Blog container.  An article on this is in the works.

Comments (0)