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