<PackageReference Include="System.Diagnostics.EventLog" Version="6.0.0" />

EventLogSession

public class EventLogSession : IDisposable
public static EventLogSession GlobalSession { get; }

public EventLogSession()

public EventLogSession(string server)

public EventLogSession(string server, string domain, string user, SecureString password, SessionAuthentication logOnType)

public void ClearLog(string logName)

public void ClearLog(string logName, string backupPath)

public void Dispose()

protected virtual void Dispose(bool disposing)

public void ExportLog(string path, PathType pathType, string query, string targetFilePath)

public void ExportLog(string path, PathType pathType, string query, string targetFilePath, bool tolerateQueryErrors)

public void ExportLogAndMessages(string path, PathType pathType, string query, string targetFilePath)

public void ExportLogAndMessages(string path, PathType pathType, string query, string targetFilePath, bool tolerateQueryErrors, CultureInfo targetCultureInfo)

public EventLogInformation GetLogInformation(string logName, PathType pathType)

public IEnumerable<string> GetLogNames()

public IEnumerable<string> GetProviderNames()