private static void CreateLog(EventLogOptions eventLogOptions) { if (!EventLog.Exists(eventLogOptions.LogName)) { EventLog.CreateEventSource(eventLogOptions.LogSource, eventLogOptions.LogSource); } }
public static EventLog GetLogInstance(EventLogOptions eventLogOptions) { return(new EventLog(eventLogOptions.LogName) { Source = eventLogOptions.LogSource }); }
public static void InitEventLog(EventLogOptions eventLogConfig, WindowsWatcherOptions workerConfig) { CreateLog(eventLogConfig); CreateLogView(); }