The case, a bit complicated, is as follows:
A php application creates logs to a file which in turn is being imported, monitored by rsyslog and then forward these logs to a server .
There are times that logrotate starts rotation but due to slow rsyslog reading period, rsyslog hasn't catch up reading some last entries. so log file is rotated possibly leaving those last entries not forwarded.
The question is about how synchronization of logrotate and rsyslog works in order to avoid those last entries to be lost. does rsyslog read the file just before it is rotated ?
Could a script or command pause logrotate execution until rsyslog reads up to the last entry of a log file and then continue to rotation ?