Merge pull request #1647 from nextcloud/stable9-backport-1562
[stable9] log version number in each log line
This commit is contained in:
commit
2f546eab71
|
@ -91,11 +91,12 @@ class OC_Log_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',
|
||||
|
@ -105,7 +106,8 @@ class OC_Log_Owncloud {
|
|||
'time',
|
||||
'method',
|
||||
'url',
|
||||
'user'
|
||||
'user',
|
||||
'version'
|
||||
);
|
||||
$entry = json_encode($entry);
|
||||
$handle = @fopen(self::$logFile, 'a');
|
||||
|
|
Loading…
Reference in New Issue