Skip to content

Commit

Permalink
only lookup severity numeric value when dealing with a string (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwsupplee authored and jdpedrie committed Nov 13, 2016
1 parent 55000ac commit 65146b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Logging/Connection/Grpc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']];
}

Expand Down

0 comments on commit 65146b7

Please sign in to comment.