Windows Azure Diagnostics supports the use of Trace
to log messages. The Windows Azure SDK provides the DiagnosticMonitorTraceListener
trace listener to capture the messages. The Windows Azure Diagnostics basic logs data buffer is used to configure their persistence to the Windows Azure Table Service.
The trace listener must be added to the Listeners
collection for the Windows Azure hosted service. This is typically done through configuration in the appropriate app.config
or web.config
file, but it can also be done in code. When it creates a worker or web role, the Windows Azure tooling for Visual Studio adds the DiagnosticMonitorTraceListener
to the list of trace listeners specified in the Configuration
section of the relevant configuration file.
Methods of the System.Diagnostics.Trace
class can be used to write error, warning and informational messages. When persisting the messages to the storage service, the Diagnostics Agent can filter...