Event View Format (.evtx) in logging

Dec 6, 2013 at 11:41 AM
Hi Team,

I've logged the exception in a file. But when user double clicks the file i want it to open in event viewer. I tried using Binary log formatter but not succeeded. Can any one help me ?
Dec 8, 2013 at 6:07 AM
As far as I know there is no existing way to write directly to an event log binary format directly. What I mean is that it's possible but I haven't seen a library that does it without using the Event Log Service. I think you would have to do it yourself based on the Event Log File Format. That doesn't really look like the best way to spend your time (of course YMMV).

What about using SvcTraceListener.exe to view log entries and then use an XML Trace Listener as the log format? ETW might also be an option depending on your specific requirements.

Randy Levy
Enterprise Library support engineer
Support How-to