Event Tracing for Windows (ETW) is a fast, scalable logging mechanism built into the Windows operating system. The EventSource class simplifies writing ETW provider as simple as writing just a few lines of code instead of creating a XML manifest, using the tool (MC.exe) to generate source code and registering the provider using the tool WEVTUTIL when the application was deployed.
Event Tracing for Windows (ETW) is a fast, scalable logging mechanism built into the Windows operating system. The EventSource class simplifies writing ETW provider as simple as writing just a few lines of code instead of creating a XML manifest, using the tool (MC.exe) to generate source code and registering the provider using the tool WEVTUTIL when the application was deployed.
Small Demo Example:
sealed class MinimalEventSource : EventSource
{
public void Load(long ImageBase, string Name) { WriteEvent(1, ImageBase, Name); }
public static MinimalEventSource Log = new MinimalEventSource();
}
Calling in code:
MinimalEventSource.Log.Load(10, “MyFile”);