tags:

views:

76

answers:

3

How can i read the windows event log by particular Source, Date time and category??

A: 

This should help

http://asp.dotnetheaven.com/util/srcview.aspx?path=~/howto/samples/Services/EventLog/LogInfo/LogInfo.src&file=CS\LogInfo\loginfo.cs&lang=C%23+Source

Sorry the link is not appearing so i have to paste whole url

Ismail
I think you missed the link
Sathish
But i am looking for particular source.. the link which u have provided will list out all the application logs
Sathish
Basically i need a filtering kind of..
Sathish
You can loop through eventLog.Entries and see event.Source and add them to a list if that is the Source you are looking for.
Ismail
A: 

You could use Log Parser

http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en

Comes with an API you can use, check the help file once installed :)

Si Philp
+1  A: 

Consider using EventLog Class.

EventLog lets you access or customize Windows event logs, which record information about important software or hardware events. Using EventLog, you can read from existing logs, write entries to logs, create or delete event sources, delete logs, and respond to log entries. You can also create new logs when creating an event source.

Lukas Šalkauskas