0

I am following the sample provided here to use the custom event source. However, after I run the sample, there is no event message found in the event viewer like figure below:

enter image description here

Did you have any idea?

Community
  • 1
  • 1
Greg
  • 36
  • 5

1 Answers1

0

You need to capture the Events with a tool:

  • With xperf: "C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\xperf.exe" -start UserLogger -on GUID -f User.etl && timeout -1 && "C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\xperf.exe" -stop UserLogger
    Change the GUID to your own
  • With perfview: perfView /onlyProviders=*MyCompanyEventSource collect
  • create your own WPRP profile and add a entry to log MyCompanyEventSource events and run wrp -start MyProfile.wprp && timeout -1 && wpr -stop result.etl
  • use EventListener Class to listen to events in your own code
  • use TraceEvent, start a realtime session and subscribe to the DynamicAll Event and parse here the MyCompanyEventSource data.

What you want is to write to Eventlog, so you have to set the Event Channel attribute

Community
  • 1
  • 1
magicandre1981
  • 27,895
  • 5
  • 86
  • 127