From 65146b7f634cb2d7e927de2aa86aa485323b9918 Mon Sep 17 00:00:00 2001 From: David Supplee Date: Sun, 13 Nov 2016 11:12:11 -1000 Subject: [PATCH] only lookup severity numeric value when dealing with a string (#243) --- src/Logging/Connection/Grpc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Logging/Connection/Grpc.php b/src/Logging/Connection/Grpc.php index d680ff879d14..cfecb35445ff 100644 --- a/src/Logging/Connection/Grpc.php +++ b/src/Logging/Connection/Grpc.php @@ -321,7 +321,7 @@ private function buildEntry(array $entry) $entry['resource']['labels'] = $this->formatLabelsForApi($entry['resource']['labels']); } - if (isset($entry['severity'])) { + if (isset($entry['severity']) && is_string($entry['severity'])) { $entry['severity'] = array_flip(Logger::getLogLevelMap())[$entry['severity']]; }