<PackageReference Include="System.Diagnostics.EventLog" Version="9.0.0-preview.4.24266.19" />

EventLogWatcher

public class EventLogWatcher : IDisposable
Allows you to subscribe to incoming events. Each time a desired event is published to an event log, the EventRecordWritten event is raised, and the method that handles this event will be executed.
namespace System.Diagnostics.Eventing.Reader { public class EventLogWatcher : IDisposable { public bool Enabled { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } set { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } } public event EventHandler<EventRecordWrittenEventArgs> EventRecordWritten { add { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } remove { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } } public EventLogWatcher(EventLogQuery eventQuery) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } public EventLogWatcher(EventLogQuery eventQuery, EventBookmark bookmark) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } public EventLogWatcher(EventLogQuery eventQuery, EventBookmark bookmark, bool readExistingEvents) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } public EventLogWatcher(string path) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } public void Dispose() { } protected virtual void Dispose(bool disposing) { } } }