Re: Problem with Event Log event triggers



According to the Microsoft documentation on the EntryWritten event, that is
by design - a feature...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdiagnosticseventlogclassentrywrittentopic.asp

HTH

Dale Preston
MCAD, MCDBA, MCSE


"amol" <amol_k3@xxxxxxxxx> wrote in message
news:1113339103.194640.121830@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I have the following code to raise events when something gets written
> to the Application log. The problem I'm seeing is when a bunch of
> entries get written to the log at the same time (or within a couple of
> seconds of each other). I receive an event for the first entry, but
> the events for the other entries aren't triggered until another entry
> is written to the log.
>
> System.Diagnostics.EventLog eventLogToMonitor = new
> System.Diagnostics.EventLog();
>
> eventLogsToMonitor.Log = "Application";
> eventLogsToMonitor.EnableRaisingEvents = true;
> eventLogsToMonitor.EntryWritten += new
> System.Diagnostics.EntryWrittenEventHandler(this.entryWrittenToLog);
>
> .....
>
> private void entryWrittenToLog(object sender,
> System.Diagnostics.EntryWrittenEventArgs e)
> {
> Console.WriteLine(DateTime.Now + ": " + e.Entry.Source);
> }
>
>
> For example,
>
> 2:00:00 pm - Error 1 written to log
> 2:00:00 pm - Error 2 written to log
> 2:00:01 pm - Error 3 written to log
> 2:05:00 pm - Information 1 written to log
>
> I see on the console:
>
> 2:00:00: Error 1 source
> 2:05:00: Error 2 source
> 2:05:00: Error 3 source
> 2:05:00: Information 1 source
>
> Basically, an event is raised in my code when Error 1 gets written. NO
> events are raised for Error 2 or 3. Then 5 minutes later when
> Information 1 gets written, I see events being raised for Error 2, 3
> and Information 1 all together.
>
> Any ideas on what the problem might be?
>
> Thanks,
> Amol
>


.



Relevant Pages

  • Re: about quick-sort using c
    ... void quick_sort(int a,int low,int high) ... on the first entry. ... One piece has entries that are all less than the ... with i indexing the 3 and j indexing the 6. ...
    (comp.lang.c)
  • Re: about quick-sort using c
    ... void quick_sort(int a,int low,int high) ... on the first entry. ... One piece has entries that are all less than the ... with i indexing the 3 and j indexing the 6. ...
    (comp.lang.c)
  • Re: Recent Projects on Start Page
    ... tried changing the number of recent items to display from 10 to 1 and then ... t see anything after the first entry you delete until it's regenerated ... If you need some of the later entries, ... would guess you can use a cut and paste to recreate the File2 value as ...
    (microsoft.public.vsnet.general)
  • Re: xnews: why doesnt this scoring work??
    ... i posted something a couple days ago, and got great responses, and have ... wont work. ... The first entry is a bypass. ... If the entries grow too long in Part-A then Part-B ...
    (news.software.readers)
  • Re: xnews: why doesnt this scoring work??
    ... i posted something a couple days ago, and got great responses, and ... but it wont work. ... The first entry is a bypass. ... If the entries grow too long in Part-A then Part-B ...
    (news.software.readers)

Loading