aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Log/LogDetails.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Log/LogDetails.php b/lib/private/Log/LogDetails.php
index 7406385fd58..982c1b23ac6 100644
--- a/lib/private/Log/LogDetails.php
+++ b/lib/private/Log/LogDetails.php
@@ -47,10 +47,8 @@ abstract class LogDetails {
$userAgent = '--';
}
$version = $this->config->getValue('version', '');
- $clientReqId = $request->getHeader('X-Request-Id');
$entry = compact(
'reqId',
- 'clientReqId',
'level',
'time',
'remoteAddr',
@@ -62,6 +60,10 @@ abstract class LogDetails {
'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