`tail` normally follows the file descriptor (`--follow=descriptor`), which becomes inaccessible when the log file is rolled or the file is moved away. See this from the man page of `tail`:
> \--retry
>
> keep trying to open a file even when it is or becomes inaccessible; useful when following by name, i.e., with --follow=name
So use it like this (`tail` follows the name not the descriptor now):
tail --follow=name --retry logfile | grep "pattern"
* * *
You will see in tails output, when the file gets truncated or moved away:
$ tail --follow=name --retry logfile
[...]
tail: logfile: file truncated
[...]
tail: `logfile' has become inaccessible: No such file or directory
tail: `logfile' has appeared; following end of new file
[...]