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