Event Log Object

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ray Maas

    #1

    Event Log Object

    I need help with the event log object. Specifically, I want to write a
    vb.net program to notify me when certain events are written to my event
    logs.

    A general discussion on the event log object and how to use it would
    probably get me started, and sample code would be most appreciated!

    Thanks,
    Ray Maas



  • Chris

    #2
    Re: Event Log Object

    Ray Maas wrote:[color=blue]
    > I need help with the event log object. Specifically, I want to write a
    > vb.net program to notify me when certain events are written to my event
    > logs.
    >
    > A general discussion on the event log object and how to use it would
    > probably get me started, and sample code would be most appreciated!
    >
    > Thanks,
    > Ray Maas
    >
    >
    >[/color]

    A quick query in google shows these two samples:

    Query the Event Log (VB.NET)
    http://www.freevbcode.com/ShowCode.asp?ID=5658

    How do I create, read, write and delete event logs in VB.NET?


    Chris

    Comment

    • Alex Sutton [MSFT]

      #3
      RE: Event Log Object

      The event log can only tell you that a new event was written to a log, not
      specifially that an event you are interested in was written. Many management
      tools use this signal to get all new events and then filter.

      However you can use the WMI event provider for the Event Log that
      essentially does this for you. Your register a WMI query for the event IDs
      and source for your app, and then get call-back with the event.

      Look at System.Manageme nt classes.

      here's one example I found

      or in script
      http://www.microsoft.com/technet/scr.../lgevvb17.mspx


      --
      This posting is provided "AS IS" with no warranties, and confers no rights.


      "Ray Maas" wrote:
      [color=blue]
      > I need help with the event log object. Specifically, I want to write a
      > vb.net program to notify me when certain events are written to my event
      > logs.
      >
      > A general discussion on the event log object and how to use it would
      > probably get me started, and sample code would be most appreciated!
      >
      > Thanks,
      > Ray Maas
      >
      >
      >
      >[/color]

      Comment

      Working...