Create new log files after rotation.
This commit is contained in:
parent
3d3b3a96e9
commit
3febc1935c
|
@ -318,6 +318,7 @@ function log_rotate()
|
|||
@rename($logfile . '.1', $logfile . '.2');
|
||||
file_put_contents($logfile, "\nLog file rotated", FILE_APPEND);
|
||||
@rename($logfile, $logfile . '.1');
|
||||
file_put_contents($logfile, "\nLog file started", FILE_APPEND);
|
||||
echo 'Rotated: ' . $logfile . "\n";
|
||||
}
|
||||
unlink($logdir . '/rotate');
|
||||
|
|
Loading…
Reference in New Issue