djberg96
11/2/2004 9:20:00 PM
Martin DeMello <martindemello@yahoo.com> wrote in message news:<qdLhd.94069$nl.87634@pd7tw3no>...
> Daniel Berger <djberg96@hotmail.com> wrote:
> >
> > What is it?
> > ===========
> > A Ruby interface for reading from and writing to the Windows Event
> > Log.
>
> I took a look through the docs and examples, but couldn't find out if
> this will let me write the app I want - basically something that will
> print out the last n entries to the console. I started up notify.rb and
> did a net send to localhost, but it didn't register - is that not the
> sort of event you're talking about?
>
> martin
It didn't work because net send's are logged in the "System" log, not
the "Application" log. The latter is what EventLog.open() defaults to
if no source is specified. Modify the notify.rb script, and create an
EventLog object this way:
e = EventLog.open("System")
It worked fine for me. :)
HTH.
Dan