I have this class for triggering ETW events:
public sealed class EventSourceWriter : EventSource
{
public static EventSourceWriter Logger = new EventSourceWriter();
[Event(1, Version = 0, Level = EventLevel.Informational)]
public void Log(string Log)
{
WriteEvent(1, Log);
}
}
As you can see, I set the EventLevel
on top of the Log
method as attribute value. Is there a way I can set it dynamically to log different EventLevels to same Event?
The idea is to see all generic logs on same table as output when an agent captures the ETW
events.