Win32utils tail eventlog error upon change

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

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