in reply to Log File Rotation
The common approach to this problem is to
- rename log-file. Like mv file.log file.log.1. The process which holds the old file descriptor open will write to renamed file from this point.
- touch new log file. touch file.log or otherwise create it.
- inform the process. For example, send it SIGHUP or even restart it.