From 636f650167d40e1b6646e1a5f3c43f4961205b16 Mon Sep 17 00:00:00 2001 From: Hector Mendoza Jacobo Date: Wed, 4 Dec 2024 23:26:20 +0000 Subject: [PATCH] Swap logic to log the info level log --- src/Logging/LoggingTrait.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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' => [