summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-08-28 17:41:27 +0200
committerBart Visscher <bartv@thisnet.nl>2013-08-28 17:41:27 +0200
commit3fd2df4088d17547a3a31023a75cf538c95ade18 (patch)
treeb817b924800e9043aa5450e937181df1c7380a00 /lib/base.php
parent42f3ecb60fb14ef9739b436f115d302b5d4432a1 (diff)
downloadnextcloud-server-3fd2df4088d17547a3a31023a75cf538c95ade18.tar.gz
nextcloud-server-3fd2df4088d17547a3a31023a75cf538c95ade18.zip
Only enable logrotate when configured. Also rotate size is settable.
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php
index f45012bb83c..2e6a37c9f4e 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -557,7 +557,8 @@ class OC {
* register hooks for the cache
*/
public static function registerLogRotate() {
- if (OC_Config::getValue('installed', false)) { //don't try to do this before we are properly setup
+ if (OC_Config::getValue('installed', false) && OC_Config::getValue('log_rotate_size', false)) {
+ //don't try to do this before we are properly setup
// register cache cleanup jobs
try { //if this is executed before the upgrade to the new backgroundjob system is completed it will throw an exception
\OCP\BackgroundJob::registerJob('OC\Log\Rotate', OC_Config::getValue("datadirectory", OC::$SERVERROOT.'/data').'/owncloud.log');