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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Dotnet 4 - Writing to event log 2
Amazon Login Location Different 4
sequrity eventLog 6
Windows Hello devices 13
Event Log on Server 2008 1
Event Log 1
save event log file in c# 1
use windows event log 1

Back
Top