a guest Feb 21st, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- public static void Load()
- string query = "*[System/Provider/@Name="SQLSERVERAGENT"]";
- EventLogQuery elq = new EventLogQuery("Application", PathType.LogName, query);
- elq.Session = new EventLogSession("x.x.x.x");
- EventLogReader elr = new EventLogReader(elq);
- _logEntries = new List<SqlEventEntry>();
- EventRecord entry;
- while ((entry = elr.ReadEvent()) != null)
- var Message = entry.???
- // I want process the message in the event here,
- // but I can't find a property anywhere that contains the message??
RAW Paste Data