Today i use below function:
Dim entry As EventLogEntry
Dim EL As New EventLog("Application", server, service)
For Each entry In EL.Entries
If entry.Source = service Then
That works and all but the log file is sometimes very big which makes this function take very long time, even when i have specified a source in EL's properties it seams to download everything, thats why the if statement. Is there anyway i can filter the source, and maybe the time before i actually downloading all the logs? if not, any other way to optimize this code to make it faster?