From 594a2af75af8d350965d11c1e77f12f1ebae456f Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 5 Jul 2013 22:42:17 +0200 Subject: [PATCH] Review fixes --- lib/log/rotate.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/log/rotate.php b/lib/log/rotate.php index d5b970c1a9e..d79fd40342c 100644 --- a/lib/log/rotate.php +++ b/lib/log/rotate.php @@ -11,16 +11,16 @@ namespace OC\Log; class Rotate extends \OC\BackgroundJob\Job { const LOG_SIZE_LIMIT = 104857600; // 100 MB public function run($logFile) { - $filesize = filesize($logFile); + $filesize = @filesize($logFile); if ($filesize >= self::LOG_SIZE_LIMIT) { $this->rotate($logFile); } } protected function rotate($logfile) { - $rotated_logfile = $logfile.'.1'; - rename($logfile, $rotated_logfile); - $msg = 'Log file "'.$logfile.'" was over 100MB, moved to "'.$rotated_logfile.'"'; + $rotatedLogfile = $logfile.'.1'; + rename($logfile, $rotatedLogfile); + $msg = 'Log file "'.$logfile.'" was over 100MB, moved to "'.$rotatedLogfile.'"'; \OC_Log::write('OC\Log\Rotate', $msg, \OC_Log::WARN); } } -- 2.39.5