public void WriteToLog(string message, EventLogEntryType type, CategoryType category, EventIDType eventID, byte[] rawData) { if (log == null) { throw (new ArgumentNullException("log", "This Event Log has not been opened or has been closed.")); } log.WriteEntry(message, type, (int)eventID, (short)category, rawData); }
public void WriteToLog(string message, EventLogEntryType type, CategoryType category, EventIDType eventID, byte[] rawData) { if (Log == null) { throw (new ArgumentNullException(nameof(Log), "This Event Log has not been opened or has been closed.")); } EventLogPermission evtPermission = new EventLogPermission(EventLogPermissionAccess.Write, MachineName); evtPermission.Demand(); Log.WriteEntry(message, type, (int)eventID, (short)category, rawData); }
public void WriteToLog(string message, EventLogEntryType type, CategoryType category, EventIDType eventID) { if (Log == null) { throw new ArgumentNullException(nameof(Log), "This Event Log has not been opened or has been closed."); } EventLogPermission eventLogPermission = new EventLogPermission(EventLogPermissionAccess.Write, MachineName); eventLogPermission.Demand(); // If you get a SecurityException here, see the notes at the // top of the class Log.WriteEntry(message, type, (int)eventID, (short)category); }
public void WriteToLog(string message, EventLogEntryType type, CategoryType category, EventIDType eventID, byte[] rawData) { if (this.log == null) throw new ArgumentNullException("log", "This Event Log has not been opened or has been closed."); this.log.WriteEntry(message, type, (int) eventID, (short) category, rawData); }
public void LogOrNotify(string message, EventLogEntryType type, CategoryType category, EventIDType eventID) { }