Skip to content

Commit

Permalink
Swap logic to log the info level log
Browse files Browse the repository at this point in the history
  • Loading branch information
Hectorhammett committed Dec 4, 2024
1 parent f35e295 commit 636f650
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Logging/LoggingTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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);
}
}

/**
Expand All @@ -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' => [
Expand Down

0 comments on commit 636f650

Please sign in to comment.