in reply to Re: Re: Remembering Log Location after process dies.
in thread Remembering Log Location after process dies.
Solution: Write some data to the file, or start File::Tail with $file=File::Tail->new(name=>$name, tail=>10);.
That will tell File::Tail to first feed you the last ten lines in the file, and then wait for new data.
File::Tail strives to be as efficient as possible, and place as little unneeded load on the system as possible. To accomplish this, File::Tail remembers how long it has been since it last found new data in the file. And it sleeps that long before checking the file again.
Solution:Wait a few minutes (if it has been long from the time when you opened the file to first new data), or start File::Tail by explicitly specifying the maximum idle time:
With that, File::Tail will never wait more than 10 seconds before checking the file.$file=File::Tail->new(name=>$name, maxinterval=>10);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Remembering Log Location after process dies.
by onegative (Scribe) on Mar 04, 2004 at 22:31 UTC |