Boost logo

Boost Users :

Subject: Re: [Boost-users] logfile write/poll mechanism
From: Thijs Koerselman (thijskoerselman_at_[hidden])
Date: 2008-12-08 14:30:59


On Mon, Dec 8, 2008 at 5:04 AM, Scott Gifford <sgifford_at_[hidden]>wrote:

>
> The general technique is to read to the end of the file, then
> periodically check the file's size to see if it's grown; if so, keep
> reading (possibly doing an explicit seek to the point you were at when
> you last saw EOF, to reset any internal flags) until you get EOF
> again.
>
> This is basically what the Unix command "tail -f" does. If you're on
> Unix you may want to use it; if you're not you may want to look at the
> source for ideas.
>

Thanks Scott. I'm on Unix atm, but it has to be crossplatform eventually.
I'll look into the tail source.

Thijs



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net