Just as the camera is important in capturing the details of moments, logging and tracing are important in an application. Without them, you have no way to record the details when they happened. Today we will discuss how to enable and record data in an application in the cloud.
The following are the additions that will be done by Visual Studio for us when creating a web or worker role in Azure.
We have to do the following.
Where the ACCOUNT_NAME is the name of the blob service and ACCOUNT_KEY is the primary or secondary access key.
We collect the default configuration and update the settings to start the Diagnostic Monitor with the new settings. Logs are the internal trace logs that will be saved in the WADLogsTable within the blob tables. In order to collect the event log, we will add an event log data source to it as well.
This will collect Windows Event Log entries that are within the Application channel and belong to "System Restore". The Windows Event Logs will be saved in WADWindowsEventLogsTable within the blob tables.
Additional Details on configuring the Diagnostic Monitor can be found here
Note: If you want to write an entry into the event log, you have to use an existing source. Creating a new source requires admin rights which are not supported in Azure.