Skip to content

Commit

Permalink
fix: add null coalesce to avoid ci errors
Browse files Browse the repository at this point in the history
  • Loading branch information
das-nagnag authored Jul 8, 2024
1 parent 0933dda commit 90c336a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Classes/Backend/JSONConsoleLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public function append(string $message, int $severity = LOG_INFO, $additionalDat
try {
$data = [
'severity' => $severityLabel,
'service' => $this->serviceContext['service'],
'version' => $this->serviceContext['version'],
'service' => $this->serviceContext['service'] ?? '',
'version' => $this->serviceContext['version'] ?? '',
'message' => $message,
'additionalData' => $additionalData,
'date' => (new \DateTime('now'))->format('Y-m-d'),
Expand All @@ -69,8 +69,8 @@ public function append(string $message, int $severity = LOG_INFO, $additionalDat
} catch (\Exception $e) {
$data = [
'severity' => $this->severityLabels[LOG_WARNING],
'service' => $this->serviceContext['service'],
'version' => $this->serviceContext['version'],
'service' => $this->serviceContext['service'] ?? '',
'version' => $this->serviceContext['version'] ?? '',
'message' => 'Could not decode additional data of log message.',
'additionalData' => [
'previousLog' => [
Expand Down

0 comments on commit 90c336a

Please sign in to comment.