If you are using Windows Azure Diagnostics with the DiagnosticMonitorTraceListener
you will most likely have a table in your storage account called WADLogsTable with a ton of data in it. It can be a bit overwhelming.
A colleague and I wanted to get two simple pieces of information: an event’s date and the corresponding message. Furthermore, we only wanted events that had happened today. Here’s what we came up with using LINQPad and the Azure Storage Driver.
First, make sure you’re using a table storage account as your database. In my case, my connection is called mycloudstorageaccount
.
Then simply perform your query. If you want to copy/paste, here’s the text version:
from l in WADLogsTable where l.PartitionKey.CompareTo(DateTime.Today.Ticks.ToString("d19")) > 0 select new { DateTime = new DateTime(l.EventTickCount.Value), l.Message }
Oh, and don’t forget to check out the SQL
tab if you are interested in the « low level stuff. » It will show the actual URL that was used to query Windows Azure.