summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-09-28 16:45:14 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-10-06 12:42:46 +0200
commit0eb992062ab5e64d821aaf1d4398a7a836f89a1a (patch)
tree9e579b22bb8e76beece7facf759f131b1ba39bed /lib
parentf6e8da186d16dd2d9898f1ac2920622f3943cbb7 (diff)
downloadnextcloud-server-0eb992062ab5e64d821aaf1d4398a7a836f89a1a.tar.gz
nextcloud-server-0eb992062ab5e64d821aaf1d4398a7a836f89a1a.zip
log version number in each log line
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Log/File.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php
index a406dd83952..904aa1d93f1 100644
--- a/lib/private/Log/File.php
+++ b/lib/private/Log/File.php
@@ -96,11 +96,12 @@ class File {
$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 File {
'time',
'method',
'url',
- 'user'
+ 'user',
+ 'version'
);
$entry = json_encode($entry);
$handle = @fopen(self::$logFile, 'a');