handle symbolic links correctly (#275)
* handle symbolic links correctly When tailing a file that is rotated we expect that a fsnotify.Rename event will be sent when the old file is renamed and a fsnotif.Create event will be sent when the replacement file is created. This allows us to close and re-open the file. However if the file we are tailing is a symbolic link (and the target is in another directory) we wont get these events. To address this we need to tail the target file directly. fixes #274 * handle symlinks being re-linked When a symbolic link is re-linked we will only get a fsnotify.Create event. No rename or delete event will have been sent to trigger the tailer to be stoped. When this happens we should stop the current tailer for the path and start a new one. This will allow us to perform a new Readink on the path to get the updated target filename.
Loading
Please register or sign in to comment