HOW TO STORE EVENT LOG IN FOLDER

Pravesh Singh

Total Post:101

Points:709
Posted by  Pravesh Singh
 886  View(s)
Ratings:
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. Sumit Kesarwani

    Post:378

    Points:2694
    Re: How to store event log in Folder

    Hi Pravesh, 

    try this:

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

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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!