Notify in log files when rotated.
This commit is contained in:
parent
e993aed1f0
commit
c8b9af9d7a
|
@ -222,6 +222,7 @@ function log_rotate()
|
|||
@rename($logfile . '.3', $logfile . '.4');
|
||||
@rename($logfile . '.2', $logfile . '.3');
|
||||
@rename($logfile . '.1', $logfile . '.2');
|
||||
file_put_contents($logfile, "\nLog file rotated", FILE_APPEND);
|
||||
@rename($logfile, $logfile . '.1');
|
||||
echo 'Rotated: ' . $logfile . "\n";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue