We can create event logs using System.Diagnostics.
Application Log
Security Log
EventLog eventLog = new EventLog("Application");
eventLog.Source = "MyApp";
eventLog.WriteEntry("Application Started", EventLogEntryType.Information);
EventLog eventLog = new EventLog("Security");
eventLog.Source = "MyApp";
eventLog.WriteEntry("Application Started", EventLogEntryType.Information);
System Log
EventLog eventLog = new EventLog("System");
eventLog.Source = "MyApp";
eventLog.WriteEntry("Application Started", EventLogEntryType.Information);
0 comments:
Post a Comment