Windows Azure Logs!

So I've been playing around with the logging capabilities in Windows Azure, and have some thoughts to get down.

Firstly, Windows Azure provide provides an object called the RoleManager as part of its Runtime API.

With the RoleManager, you can WriteToLog (or write to a log). You can write different levels of messages, such as Critical, Error, Warning, Information and Verbose.

Once you start writing to a log, you need to do a couple of things to get the logs.

First, you need to dump the logs to a storage project. To do this:

1. Click on the Configure button on one of your hosted services


2. Select a Storage Account where you want your logs dumped to, and either use the generated name or insert your own into the Container name field. Your log files will be dumped into blobs within this container. I did not use my application storage project for logs, I created a second storage project called Logs, and dumped my logs to that.


Now, you just need to get them! I wrote a simple WPF app to grab these using my storage lib:


Easy! If you need the app, you'll need the following projects:

1. LogBrowser

2. Windows.Azure.Storage


Technorati Tags: Windows Azure,Windows Azure Samples,Logs