|
|
|
@ -491,7 +491,7 @@ class OC { |
|
|
|
|
self::registerCacheHooks(); |
|
|
|
|
self::registerFilesystemHooks(); |
|
|
|
|
self::registerShareHooks(); |
|
|
|
|
\OCP\BackgroundJob::registerJob('OC\Log\Rotate', OC_Config::getValue("datadirectory", OC::$SERVERROOT.'/data').'/owncloud.log'); |
|
|
|
|
self::registerLogRotate(); |
|
|
|
|
|
|
|
|
|
//make sure temporary files are cleaned up |
|
|
|
|
register_shutdown_function(array('OC_Helper', 'cleanTmp')); |
|
|
|
@ -553,6 +553,20 @@ 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 |
|
|
|
|
// 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'); |
|
|
|
|
} catch (Exception $e) { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* register hooks for the filesystem |
|
|
|
|
*/ |
|
|
|
|