Solution for Proposal #19974
Show username when writing into owncloud.log
This commit is contained in:
parent
8a8209796d
commit
1a8a667863
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue