Application diagnostics and logging in the cloud
Think of how we currently log our events and diagnostics. We have IIS logs and application logs to help us see things in the event of something not working. These logs live on our physical servers, and we can access them anytime we need. Now, think of how our application lives in Windows Azure. We don't have any physical machines to save logs or any control of IIS. How are we going to store our logs for debugging problems?
Fortunately, even Microsoft had to confront this problem and it came up with an appropriate answer. First, we need to ensure our application has a trace listener enabled; a trace listener is a link between our application and Azure's diagnostic tools. We need to confirm the following code is present in the web.config
file:
<system.diagnostics> <trace> <listeners> <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture...