问题
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).
回答1:
You first need to activate the Application Logging:
- Go to your Web App.
- Go to
Monitoring
/Diagnostics logs
. - Enable
Application Logging
and configure it.
This article can also be useful: https://stackify.com/azure-app-service-log-files/
来源:https://stackoverflow.com/questions/47038390/track-system-diagnostics-trace-logs-in-azure-portal