Compare commits

...

1 Commits

Author SHA1 Message Date
Christoph Wurst 826409394a fix(session): Log session ID for debugging
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-01-23 14:00:16 +01:00
+7
View File
@@ -26,6 +26,7 @@
namespace OC\Log;
use OC\SystemConfig;
use Throwable;
abstract class LogDetails {
public function __construct(
@@ -51,6 +52,11 @@ abstract class LogDetails {
}
$request = \OC::$server->getRequest();
$reqId = $request->getId();
$sessionId = '--';
try {
$session = \OC::$server->getSession();
$sessionId = $session->getId();
} catch (Throwable $e) {}
$remoteAddr = $request->getRemoteAddress();
// remove username/passwords from URLs before writing the to the log file
$time = $time->format($format);
@@ -68,6 +74,7 @@ abstract class LogDetails {
$version = $this->config->getValue('version', '');
$entry = compact(
'reqId',
'sessionId',
'level',
'time',
'remoteAddr',