3

I would like to add custom data into the Windows event log message as formatted text (XML string) . Whatever I add, gets added as strings and are shown with the XML tags. Is there a recommended way to add custom data to the log entry? A typical log entry looks like this:

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
        ...
 </System>
 <EventData>
  <Data>3031358440</Data> 
  <Data>5</Data> 
  <Data>WindowsUpdateFailure</Data> 
  <Data>Not available</Data> 
 </EventData>
</Event>

I would like to add data like this:

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
        ...
 </System>
 <EventData>
  <Data>
    <ThreadID/>
    <AssignedPriority/>
  </Data>
 </EventData>
</Event>
ajeshjohn
  • 91
  • 6
  • 1
    For anyone who is interested, I ended up using key=value pairs in the description. – ajeshjohn Feb 08 '13 at 06:43
  • If you have found a solution, please post it as an answer. This will help future users find the answer easier, and you can earn more upvotes/reputation. – Ryan Gates Jun 12 '13 at 19:11

0 Answers0