Posts Tagged azure

Azure Web Seminars

Ola and I are working and a series of Web seminars on the Windows Azure Platform… Just posted “Windows Azure Fundamentals” and “Developing a Windows Azure Application“… Hope you enjoy!

No Comments

Windows Azure Log Viewer

As Chris and Don are fond of saying, Windows Azure is a “nascent” technology. This means that there are features that, although they may be in a future release, are simply not there right now. One of these is the ability to easily read the log entries from your Windows Azure applications running in the cloud. I’ve built a little app that will hopefully make it a bit easier!

First, a quick intro: You can write messages to Windows Azure Logs by calling the RoleManager.WriteToLog() method in the Microsoft.ServiceHosting.ServiceRuntime namespace. When the app is running in the development fabric, you can see the messages in the Development Fabric UI. When the app is running in the cloud, the messages just sort of exist in the Web or Worker role that they originated in. To view them, you first need to copy them to a Windows Azure storage account. You do this by clicking the Configure button for your app, and then clicking Copy Logs.

At this point, your logs are now stored as blobs in Windows Azure storage. To get at them using just the SDK tools, you can use the CloudDrive sample (as described in this great post by Jim Nakashima.) Inspired by David Aiken’s Windows Azure Online Log Reader, I’ve created a WPF app that should make it really easy to view your logs.

Using it is pretty straightforward: when the application starts up it will prompt you for a storage account name and secret key. When you log in, the app scans blob storage for any container that includes a blob whose name begins with “WebRole” or “WorkerRole”. That way, it filters out blob containers that don’t contain log entries. Then it parses the blob names and creates a tree view of the logs (essentially, recreating the hierarchy shown in the development fabric UI.)

You can also modify various display settings. As always, there are a few things that I still want to add:

  • Search functionality
  • Support for combining logs (so that you don’t need to look at logs in 15 minute increments)
  • Sorting by column (it’s why I made the column headers buttons – they don’t do anything right now!)
  • Persist settings in-between sessions

At any rate, I hope you find it useful!

Download Azure Log Viewer

, ,

2 Comments