Notify in log files when rotated.

This commit is contained in:
Retro_Guy 2024-05-13 06:41:02 -07:00
parent e993aed1f0
commit c8b9af9d7a
1 changed files with 1 additions and 0 deletions

View File

@ -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";
}