pytailer
pytailer copied to clipboard
Support reopening when file is replaced (tail --follow=name)
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.
bump
bump again. Also willing to help
Will accept pull requests. Haven't had a chance to work on this.
Exactly how I use pytailer, for following log files that rotate. Any chance this will be picked up some time?