Merge pull request #22555 from owncloud/jenkins-19978

Show username when writing "Insufficient storage" into owncloud.log
This commit is contained in:
Thomas Müller 2016-02-22 14:13:59 +01:00
commit 7f2b3dbfd2
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"; $message = "HTTP/1.1 {$ex->getHTTPCode()} $message";
} }
$user = \OC_User::getUser();
$exception = [ $exception = [
'Message' => $message, 'Message' => $message,
'Exception' => $exceptionClass, 'Exception' => $exceptionClass,
@ -101,6 +103,7 @@ class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin {
'Trace' => $ex->getTraceAsString(), 'Trace' => $ex->getTraceAsString(),
'File' => $ex->getFile(), 'File' => $ex->getFile(),
'Line' => $ex->getLine(), 'Line' => $ex->getLine(),
'User' => $user,
]; ];
$this->logger->log($level, 'Exception: ' . json_encode($exception), ['app' => $this->appName]); $this->logger->log($level, 'Exception: ' . json_encode($exception), ['app' => $this->appName]);
} }