diff --git a/src/Monolog/Formatter/GelfMessageFormatter.php b/src/Monolog/Formatter/GelfMessageFormatter.php index 6ebfaa7f..8d01c64c 100644 --- a/src/Monolog/Formatter/GelfMessageFormatter.php +++ b/src/Monolog/Formatter/GelfMessageFormatter.php @@ -89,7 +89,7 @@ class GelfMessageFormatter extends NormalizerFormatter $message->setAdditional($this->contextPrefix . $key, is_scalar($val) ? $val : $this->toJson($val)); } - if (null === $message->getFile() && isset($record['context']['exception'])) { + if (null === $message->getFile() && isset($record['context']['exception']['file'])) { if (preg_match("/^(.+):([0-9]+)$/", $record['context']['exception']['file'], $matches)) { $message->setFile($matches[1]); $message->setLine($matches[2]);