Solution for Proposal #19974

Show username when writing into owncloud.log
This commit is contained in:
Pierre Jochem 2015-10-22 15:46:33 +02:00 committed by Joas Schilling
parent 8a8209796d
commit 1a8a667863
1 changed files with 3 additions and 0 deletions

View File

@ -94,6 +94,8 @@ class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin {
$message = "HTTP/1.1 {$ex->getHTTPCode()} $message";
}
$user = \OC_User::getUser();
$exception = [
'Message' => $message,
'Exception' => $exceptionClass,
@ -101,6 +103,7 @@ class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin {
'Trace' => $ex->getTraceAsString(),
'File' => $ex->getFile(),
'Line' => $ex->getLine(),
'User' => $user,
];
$this->logger->log($level, 'Exception: ' . json_encode($exception), ['app' => $this->appName]);
}