EventSource vs EventProvider

What are the main differences between the EventSource and EventProvider classes?

I understand that both classes are event providers for ETW. If these two key differences are not, then what are the pros and cons.

I use the EventSource class simply because I found more examples / documentation on the Internet, and seemed to have a simpler implementation of channel support (recording to the default channels in the event viewer window is admin, operational, analytical and debugging), since the EventRegister class Automatically creates a manifest (described here ).

+4
source share
1 answer

In .NET 3.5, the class EventProviderwas the only option for tracking using ETW. As stated in the documentation , you should create a toolkit manifest file for your custom events that describes the data types inside your posts. This is not an easy task, and it requires the use of separate tools, such as the manifest generator (ecmangen.exe). See this post for more information .

EventSourcethe class was added in .NET 4.5 and introduced a simple approach to write your own events using ETW. Instead of creating these manifest files, they are automatically created for you, saving overhead.

EventProvider, . , EventSource .

+2

Source: https://habr.com/ru/post/1670066/


All Articles