pytailer icon indicating copy to clipboard operation
pytailer copied to clipboard

Support reopening when file is replaced (tail --follow=name)

Open charles-dyfis-net opened this issue 12 years ago • 4 comments

At present, pytailer does not poll for whether a file's direntry has been replaced, as during log rotation; GNU's version of the tail command does have this functonality.

Add an optional flag to the follow() call to persist in following a file even when that file has been rotated. If this flag is set and no new content is available after a sleep, the directory entry should be checked to determine whether it points to the same inode -- and if a new file replaces the old one, that new file should be opened and all lines from the very top of the file returned.

charles-dyfis-net avatar Jan 11 '13 21:01 charles-dyfis-net

bump

nibalizer avatar Dec 27 '14 03:12 nibalizer

bump again. Also willing to help

hiteshd avatar Aug 22 '15 06:08 hiteshd

Will accept pull requests. Haven't had a chance to work on this.

six8 avatar Mar 04 '16 18:03 six8

Exactly how I use pytailer, for following log files that rotate. Any chance this will be picked up some time?

niels-anders avatar Sep 29 '17 10:09 niels-anders