Track System.Diagnostics.Trace logs in Azure portal
Asked Answered
E

1

8

In my web application, I use

System.Diagnostics.Trace.WriteLine(...);

for diagnostics. The application is published to an Azure deployment slot. I am wondering where I can find these logs in the Azure Portal (or Visual Studio's cloud explorer).

Eastertide answered 31/10, 2017 at 14:56 Comment(1)
Do you not have to configure the location of these logs in your web.config?Renowned
C
8

You first need to activate the Application Logging:

  1. Go to your Web App.
  2. Go to Monitoring / App Service logs.
  3. Enable Application Logging and configure it.

Application Logging

This article can also be useful: https://stackify.com/azure-app-service-log-files/

Cecum answered 31/10, 2017 at 21:16 Comment(3)
Very useful articleKagera
Where is Application logging now (the menu and options are all very different now, and search does not show that name)Sestina
Updated the screenshot with the new UI.Cecum

© 2022 - 2024 — McMap. All rights reserved.