diff --git a/lib/private/Log/LogDetails.php b/lib/private/Log/LogDetails.php index 9673bf17e5a2e..982c1b23ac6db 100644 --- a/lib/private/Log/LogDetails.php +++ b/lib/private/Log/LogDetails.php @@ -60,6 +60,10 @@ public function logDetails(string $app, $message, int $level): array { 'userAgent', 'version' ); + $clientReqId = $request->getHeader('X-Request-Id'); + if ($clientReqId !== '') { + $entry['clientReqId'] = $clientReqId; + } if (is_array($message)) { // Exception messages are extracted and the exception is put into a separate field