summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-07-05 22:42:17 +0200
committerBart Visscher <bartv@thisnet.nl>2013-08-28 17:11:43 +0200
commit594a2af75af8d350965d11c1e77f12f1ebae456f (patch)
tree36750f54be0008fedb9acacbb6600dad3704e404 /lib
parentb5e2842e0049f64b0f7c7ba9ce8b831bd84a0d78 (diff)
downloadnextcloud-server-594a2af75af8d350965d11c1e77f12f1ebae456f.tar.gz
nextcloud-server-594a2af75af8d350965d11c1e77f12f1ebae456f.zip
Review fixes
Diffstat (limited to 'lib')
-rw-r--r--lib/log/rotate.php8
1 files 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);
}
}