Azure Log providers provides a set of ready to use loggers for Windows Azure applications.

Currently It has following log providers.

1. AzureDiagnosticLogProvider – This log provider uses DiagnosticMonitorTraceListener.

Advantages -

  • This is shipped with Azure and recommended by Microsoft for logging in Azure applications.
  • Logs messages in WADLogs table of specified storage account.
  • Any open source or paid azure storage client viewer can be used to view logs.

Disadvantages -

  • If more then one applications are using the same storage account then logs for all those applications are logged in same WadLogs table.
  • Most of us are used to file system logging and have been using text or xml files for logging so adapting logs stored in a azure table is difficult.
  • When logs becomes huge filtering the logs for debugging becomes a tedious task.
  • Each transaction in azure table has a cost associated to it so this is not a cost effective way of logging.
  • Logs can not be filtered on activity id.  

2. EnterpriseRollingFileLogProvider – This log provider uses RollingFlatFileTraceListener.

Advantages -

  • This uses text files for logging so those who are fond of file system logging can use it.
  • Text files are transferred to BLOB storage after an specified time interval so logs are never lost.
  • Text files can be easily downloaded from BLOB storage and can be viewed by any text file viewer.
  • Number of transactions for managing logs are reduced significantly due to grouping of log message in text files so cost for viewing and managing logs is reduced.

Disadvantages -

  • WCF Trace viewer can not be used to view the logs so filtering on basis of activity id or messages and projects can not be done.

3. EnterpriseRollingXmlFileLogProvider – This log provider uses RollingXmlTraceListener, Which is custom trace listener shipped along with this library.

Advantages -

  • This uses xml files for logging so those who are fond of file system logging can use it.
  • XML files are transferred to BLOB storage after an specified time interval so logs are never lost.
  • XML files can be easily downloaded from BLOB storage and can be viewed by any XML file viewer.
  • Number of transactions for managing logs are reduced significantly due to grouping of log message in xml files so cost for viewing and managing logs is reduced.
  • WCF trace viewer can be used for viewing the logs so we can filter the logs on activity id and messages.

Other Features

  • Support to group logs with an activity id. StartLogicalGrouping method can be used for this.
  • In built support for method an activity start and end tracing.
  • Easily configurable. Enterprise library configurations are not required. It is done internally using fluent API.
  • Support to change log level at run time which is not supported by Enterprise library
  • Switching between log providers is very easy.
  • More then one log providers can be added and switching between them is possible. 

Upcoming Features

  • A log4net log provider.
  • A log viewer which is specially made for the providers in the library.

Last edited May 10, 2012 at 10:22 AM by atulsrivas1, version 9