MTuk
MTuk

Reputation: 179

Azure Websites and Event Logs

I've an ASP.NET application I'm trying to migrate to an Azure website (shared). In its current form this uses the Event Log to record exceptions.

On Azure websites I can't write to the Event Log so I get an exception trying to record the exception.

What is the recommended way of logging under Azure websites? How can I detect that I'm running under a website and not on my own machine?

Upvotes: 1

Views: 2002

Answers (2)

user3922344
user3922344

Reputation:

What about using Azure storage table?

Upvotes: 0

Puneet Gupta
Puneet Gupta

Reputation: 2297

As long as you are not creating a new event source, you should be able to write to the event logs using same code. In azure app service, the event logs are available in the form of eventlog.xml.

You can read more about the event logs @ https://blogs.msdn.microsoft.com/puneetgupta/2014/09/24/azure-website-siteextension-to-view-eventlogs/

Upvotes: 2

Related Questions