diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-04-25 17:42:14 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-04-26 12:10:53 +0200 |
commit | b841a477c6b96a13ea061df3fc622c3067514bf2 (patch) | |
tree | c0bb6e6aa539323f187aa03ed67b52b8dfb8b4ad /apps/admin_audit/lib/AppInfo | |
parent | ab7a4b869397a5bc267a9f10b42654b35bbe1af6 (diff) | |
download | nextcloud-server-b841a477c6b96a13ea061df3fc622c3067514bf2.tar.gz nextcloud-server-b841a477c6b96a13ea061df3fc622c3067514bf2.zip |
log to $datadir/audit.log by default and add rotation
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/admin_audit/lib/AppInfo')
-rw-r--r-- | apps/admin_audit/lib/AppInfo/Application.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php index f0387e86057..77b76885a20 100644 --- a/apps/admin_audit/lib/AppInfo/Application.php +++ b/apps/admin_audit/lib/AppInfo/Application.php @@ -63,8 +63,10 @@ class Application extends App { public function initLogger() { $c = $this->getContainer()->getServer(); + $config = $c->getConfig(); - $logFile = $c->getConfig()->getAppValue('admin_audit', 'logfile', null); + $default = $config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/audit.log'; + $logFile = $config->getAppValue('admin_audit', 'logfile', $default); if($logFile === null) { $this->logger = $c->getLogger(); return; |