I'm setting up logging for Azure service. Currently, messages I get in wadlogstable look like this:
<Properties>
<EventTickCount SqlType="bigint">635193311660155844</EventTickCount>
<DeploymentId SqlType="nvarchar(max)">deployment21(67) </DeploymentId>
<Role SqlType="nvarchar(max)">HTMLConverterWebRole </Role>
<RoleInstance SqlType="nvarchar(max)">deployment21(67).HTMLConverterWrapper.Cloud.HTMLConverterWebRole_IN_0 </RoleInstance>
<Level SqlType="int">2</Level>
<EventId SqlType="int">0</EventId>
<Pid SqlType="int">6900</Pid>
<Tid SqlType="int">14840</Tid>
<Message SqlType="nvarchar(max)">2013-11-06 12:39:25.8449|ERROR|My error message</Message>
</Properties>
I haven't been to production yet, but I suppose that it's pretty inconvenient to search in xml. What are the best practices for this? Can I customize the elements in it? I don't think I really need Pid, Tid, also I don't see a purpose of EventId.
Update: I'm actually using NLog right now, but I'm doing it as described here: http://awkwardcoder.blogspot.com/2012/03/getting-nlog-working-with-azure-is-as.html
So it posts logs to Trace target and as I understand traces are captured by DiagnosticMonitorTraceListener, ending in Windows Azure table. So I'm using NLog to format my "Message" element in the resulting xml, also "Level" and "EventId" are elements are dependent on which NLog method I call (Logger.Debug* or Logger.Error* etc.), but I don't have access to general format of this xml. Also, I would probably prefer custom logging table with dedicated fields for "Level", "Date" and so on, so I don't have to parse it in each log query.