Skip to content
Snippets Groups Projects
Commit 1a8a6678 authored by Pierre Jochem's avatar Pierre Jochem Committed by Joas Schilling
Browse files

Solution for Proposal #19974

Show username when writing into owncloud.log
parent 8a820979
No related branches found
No related tags found
No related merge requests found
......@@ -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]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment