Forum: Ruby win32utils tail eventlog error upon change

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6087a044557d6b59ab52e7dd20f94da8?d=identicon&s=25 Peña, Botp (Guest)
on 2006-05-09 05:58
(Received via mailing list)
Hi win32 team,

I have the ff code.

C:\ruby\win-eventlog>cat test4.rb
require 'win32/eventlog'
include Win32

# Tail the event logs

EventLog.open('Security').tail{ |log|
   p 'changed noted!' if /account (changed|disabled)/i =~
log.description
   p log
}


and I'm gettting the ff error (if i trigger a change, eg, change an
account password),

C:\ruby\win-eventlog>ruby test4.rb
test4.rb:7:in `tail': Insufficient system resources exist to complete
the requested service. (Win32::EventLogError)
        from test4.rb:7


hope you could give me some hints on proper tailing the security log.
thank you.

kind regards -botp
Aee77dba395ece0a04c688b05b07cd63?d=identicon&s=25 Daniel Berger (Guest)
on 2006-05-09 06:32
(Received via mailing list)
Peña wrote:
> EventLog.open('Security').tail{ |log|
>
>
> hope you could give me some hints on proper tailing the security log.
> thank you.
>
> kind regards -botp

Works fine for me.  The error you're seeing makes me wonder if the
particular event log is over 64k.  If you look at the event log manually
through the Windows Event Viewer, can you get a rough idea of how big it
is?

Can you tell us what platform you're on, what version of Ruby you're
running, what version of win32-eventlog and how you built/installed
win32-eventlog?

Regards,

Dan
This topic is locked and can not be replied to.