How to store event log in Folder

Total Post:101


 1329  View(s)
Rate this:

I'm using the System.Diagnostics namespace to log errors, warning and information. 

Using Windows 7 I see that the log I've set for the project is under "Applications and Services Logs". 

How can I set in code to create a folder and put it under "Applications and Services Logs[SOME FOLDER]\Applications and Services Logs"?

  1. Re: How to store event log in Folder

    Hi Pravesh, 

    try this:

    EventLog.CreateEventSource("Source", "Log name");

    EventLog.WriteMessage("Source", "Your message");


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.