Home > DeveloperSection > Forums > How to store event log in Folder
Pravesh Singh
Pravesh Singh

Total Post:101

Points:709
Posted on    August-26-2014 2:30 AM

 ASP.Net
Ratings:


 1 Reply(s)
 626  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"?



Sumit Kesarwani

Total Post:378

Points:2694
Posted on    August-26-2014 3:03 AM

Hi Pravesh, 
try this:

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

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


Don't want to miss updates? Please click the below button!

Follow MindStick