pipelog
Pipe input to a file which can be rotated/cleared via signals.
...Without such an intermediate, replacing, moving or deleting the log would make it impossible to resume accumulating output because the process would continue to use a filehandle to an old inode; some applications (such as syslogd) implement signal handling themselves so that another utility (such as logrotate) can be used to move their log(s), and then signal the application to re-open — but this is often not the case.
On receipt of SIGUSR1, pipelog will rotate the log file to log file .1, and move any existing .1 to .2, etc, while continuing to buffer input. ...