From 63745930997e1b7e24dd0a21482ad0bbb5ff41ff Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 28 Sep 2016 16:45:14 +0200 Subject: [PATCH] log version number in each log line Signed-off-by: Morris Jobke --- lib/private/Log/Owncloud.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/private/Log/Owncloud.php b/lib/private/Log/Owncloud.php index 2cc70015e3c..e7cdfcd1210 100644 --- a/lib/private/Log/Owncloud.php +++ b/lib/private/Log/Owncloud.php @@ -96,11 +96,12 @@ class Owncloud { $time = $time->format($format); $url = ($request->getRequestUri() !== '') ? $request->getRequestUri() : '--'; $method = is_string($request->getMethod()) ? $request->getMethod() : '--'; - if(\OC::$server->getConfig()->getSystemValue('installed', false)) { + if($config->getValue('installed', false)) { $user = (\OC_User::getUser()) ? \OC_User::getUser() : '--'; } else { $user = '--'; } + $version = $config->getValue('version', ''); $entry = compact( 'reqId', 'remoteAddr', @@ -110,7 +111,8 @@ class Owncloud { 'time', 'method', 'url', - 'user' + 'user', + 'version' ); $entry = json_encode($entry); $handle = @fopen(self::$logFile, 'a'); -- 2.39.5