Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > reading a growing log file

Reply
Thread Tools

reading a growing log file

 
 
seabass
Guest
Posts: n/a
 
      10-05-2003
i need to read events from a log file as they are being logged. using
the cookbook i added the following to my script:

for (; {
while (<FH>) { .... }
sleep $SOMETIME;
seek(FH, 0, 1);
}

this does not work correctly. when sending 15,000 lines to the log file
only 14,938 are processed.

if anyone has any ideas on either how to fix this or a better way to do
it i am all ears.

tia!

-dj

 
Reply With Quote
 
 
 
 
seabass
Guest
Posts: n/a
 
      10-05-2003
figured out that the problem was with the data and not the script

seabass wrote:
> i need to read events from a log file as they are being logged. using
> the cookbook i added the following to my script:
>
> for (; {
> while (<FH>) { .... }
> sleep $SOMETIME;
> seek(FH, 0, 1);
> }
>
> this does not work correctly. when sending 15,000 lines to the log file
> only 14,938 are processed.
>
> if anyone has any ideas on either how to fix this or a better way to do
> it i am all ears.
>
> tia!
>
> -dj
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading then sending new parts of a log file Chuck Connors Python 4 06-24-2009 09:43 PM
My error log is growing dangerously large... Nigel Perl Misc 11 05-16-2009 02:13 AM
How to log independently of other webapps using log4j? Also, reading from log file from within servlet? unomystEz Java 0 11-19-2006 10:42 AM
How to dynamically display entries made into a growing log file Aspiring .NET Programmer ASP .Net 6 10-04-2006 06:46 PM
Urgent Pls: Facing problem in reading Log information from Log file, created by IIS Amratash ASP .Net 0 04-13-2004 09:08 AM



Advertisments