We battled with Windows Azure sites since we couldn’t compose logs. Utilizing Log4Net to write to log documents as we generally do, does not work for Azure Websites as a result of the constrained record permission. We needed to depend on email warnings or Virtual Machine when we expected to investigate Azure Websites, which was a enormous migraine!
Luckily, it is all finished at this point. To keep in touch with the Application Log of an Azure Website, simply utilize System.Diagnostics.Trace name space and utilize strategy like TraceInformation, TraceError, TraceWarning to record distinctive levels of log!
Then, just turn on the Application Logging and select a logging level for that Azure Website.
With this feature, it becomes much easier to troubleshoot Azure websites. Even better, Microsoft provides this streaming log function from which you can view application logs in REAL-TIME (New Azure portal only)!
Furthermore, here is something developers will definitely like – this streaming log also is available in Visual Studio, and you can filter the results using Regular Expression (latest version Azure SDK is required).
Since file logging is supposed to be turned off automatically after 12 hours, if you also want to log into a table storage, not a problem. You can set up an Azure Storage to hold the log.
Click View settings of the Azure Website in Visual Studio. In the Log tab, there will be a nice table view of the log. I notice that it uses a lot of memory of the Azure Website. Just something to consider.
That is the thing that I know about logging to Azure Websites. Ideally it is useful. We utilize Azure for the majority of our web applications and I think it is simply showing signs of improvement regular. Presently, with the capacity to compose application logs for Azure Websites, it addresses the majority of our issues, yet there is as yet a tremendous arrangement of energizing highlights we haven’t utilized. I anticipate investigating those sometime in the future!
This blog originally appeared on Derek’s blog, Stuff.