Windows Event Log

  • Thread starter Thread starter Gas
  • Start date Start date
Use the System.Diagnostics.EventLog class. At is simplest you can use:
System.Diagnostics.EventLog.WriteLog("applicationName","error message");
 
Gas said:
Hi,

Can anyone tell me how can I log an Windows Event Log using C#?

Gas
You can use the System.Windows.EventLog class. I has a number of static
methods, like "WriteEntry" that you can use to write to the event log.

Bennie Haelen
 
Back
Top