diff options
author | Robin Appelman <robin@icewind.nl> | 2017-01-02 16:16:15 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-01-06 16:10:07 +0100 |
commit | 54f96e5f58d0e5f7239e7274ac239fec807fa206 (patch) | |
tree | e2ff56ce315ab6bf56f857f8213a717b1d777458 /lib/private/Log | |
parent | 4a2fbe9a5b6fd17781dd6de78b1247824618d717 (diff) | |
download | nextcloud-server-54f96e5f58d0e5f7239e7274ac239fec807fa206.tar.gz nextcloud-server-54f96e5f58d0e5f7239e7274ac239fec807fa206.zip |
Get the logfile location while running the logrotate cron job instead of when registering the job
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Log')
-rw-r--r-- | lib/private/Log/Rotate.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Log/Rotate.php b/lib/private/Log/Rotate.php index 6c87c167378..866068433ff 100644 --- a/lib/private/Log/Rotate.php +++ b/lib/private/Log/Rotate.php @@ -32,7 +32,9 @@ namespace OC\Log; */ class Rotate extends \OC\BackgroundJob\Job { private $max_log_size; - public function run($logFile) { + public function run($dummy) { + $systemConfig = \OC::$server->getSystemConfig(); + $logFile = $systemConfig->getValue('logfile', $systemConfig->getValue('datadirectory', \OC::$SERVERROOT . '/data') . '/nextcloud.log'); $this->max_log_size = \OC::$server->getConfig()->getSystemValue('log_rotate_size', false); if ($this->max_log_size) { $filesize = @filesize($logFile); |