diff --git a/src/Logging/LoggingTrait.php b/src/Logging/LoggingTrait.php index 9c2d48567..567909a61 100644 --- a/src/Logging/LoggingTrait.php +++ b/src/Logging/LoggingTrait.php @@ -67,6 +67,10 @@ private function logRequest(RpcLogEvent $event): void */ private function logResponse(RpcLogEvent $event): void { + if (!is_null($event->status)) { + $this->logStatus($event); + } + $debugEvent = [ 'timestamp' => $event->timestamp, 'severity' => strtoupper(LogLevel::DEBUG), @@ -92,10 +96,6 @@ private function logResponse(RpcLogEvent $event): void if ($stringifiedEvent !== false) { $this->logger->debug($stringifiedEvent); } - - if (!is_null($event->status)) { - $this->logStatus($event); - } } /** @@ -105,7 +105,7 @@ private function logStatus(RpcLogEvent $event): void { $infoEvent = [ 'timestamp' => $event->timestamp, - 'severity' => LogLevel::INFO, + 'severity' => strtoupper(LogLevel::INFO), 'clientId' => $event->clientId, 'requestId' => $event->requestId ?? null, 'jsonPayload' => [