Implementing custom logging
Windows Azure Diagnostics can be used to persist third-party log files in the same way it persists IIS logs, failed request logs, and crash dumps. These are all configured through the directories data buffer.
The directories data buffer comprises a set of data sources. These are instances of the DirectoryConfiguration
class that exposes the following properties:
Container
DirectoryQuotaInMB
Path
A data source maps a path in the local file system with a container in the Windows Azure Blob Service. The DirectoryQuotaInMB
reserves a specified amount of space in local storage for the specified data source. A scheduled transfer period is specified at the level of the directories data buffer. The Diagnostics Agent persists to the configured container any files added to the specified path since the last transfer.
In this recipe, we will learn how to use Windows Azure Diagnostics to persist custom logs to the Windows Azure Blob Service.
How to do it...
We are going to see how...