> -----Original Message-----
> From: win32utils-devel-bounces rubyforge.org
> [mailto:win32utils-devel-bounces rubyforge.org] On Behalf Of
> Heesob Park
> Sent: Sunday, May 21, 2006 11:22 PM
> To: Development and ideas for win32utils projects
> Subject: Re: [Win32utils-devel] Possible problems with
EventLog#write
>
>
> Hi,
>
> 2006/5/22, Daniel Berger <djberg96 gmail.com>:
> > Heesob Park wrote:
> >
> > <snip>
> > However, I took that general idea and came up with
this solution:
> >
> > # Remove references to the last instance variable
first
> > def tail(frequency=5)
> > unless block_given?
> > raise EventLogError, 'block missing for
tail()'
> > end
> >
> > old_total = total_records()
> > flags = FORWARDS_READ | SEEK_READ
> > rec_num = read_last_event.record_number
> >
> > while true
> > new_total = total_records()
> > if new_total != old_total
> > read(flags, rec_num).each{ |log| yield
log }
> > old_total = new_total
> > rec_num = read_last_event.record_number
> > end
> > sleep frequency
> > end
> > end
> >
> > I tail'd the Security log (where I could force
lots of log
> entries by
> > doing some random things with user accounts) and
it handled it just
> > fine.
> >
> > If you see any problems with this approach please
let me know.
> > Otherwise, I'm going to commit it later this week
(along
> with updated
> > docs).
> >
> It works fine. go ahead.
Ok, I'm going to get it out sometime in the next few days.
I got a
bunch of the preliminary work out of the way last night, but
I need to
put out the next release of windows-pr first.
> > However, that still leaves us with the bigint/long
issue.
> >
> The bigint/long issue is only in c version of eventlog.
> The source eventlog.c line #711
> dwEventID = NUM2INT(v_event_id);
> should be
> dwEventID = NUM2ULONG(v_event_id);
>
> Pure ruby version works fine.
You're right, thank you. Well, I guess we won't have to
worry about
that any more.
Thanks for you time and help.
Dan
This communication is the property of Qwest and may contain
confidential or
privileged information. Unauthorized use of this
communication is strictly
prohibited and may be unlawful. If you have received this
communication
in error, please immediately notify the sender by reply
e-mail and destroy
all copies of the communication and any attachments.
_______________________________________________
win32utils-devel mailing list
win32utils-devel rubyforge.org
http://rubyforge.org/mailman/listinfo/win32utils-devel
|