My C# application subscribes to Windows Event Log messages:
var subscriptionQuery = new EventLogQuery(Settings.Default.LogPath, PathType.LogName, Settings.Default.LogQuery); _watcher = new EventLogWatcher(subscriptionQuery); _watcher.EventRecordWritten += EventLogEventRead;
When message occurs
EventLogEventRead handler reseives a
System.Diagnostics.Eventing.Reader.EventLogRecord object, containing event data. This information includes a collection of
The problem is:
EventProperty only defines a value, not the name of the property. However, when I open the same event in Windows Event Log Viewer, it shows properties with names.
Now the question is: How do I get event propery names?