Просмотр исходного кода

Fixed message not being passed to client when capturing an exception

The raven client expects the message to be at the first level of the data array when passing an exception.
see https://github.com/getsentry/sentry-php/blob/master/lib/Raven/Client.php#L795
Ben Dubuisson 8 лет назад
Родитель
Сommit
22b92c7c00
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/Monolog/Handler/RavenHandler.php

+ 1 - 1
src/Monolog/Handler/RavenHandler.php

@@ -180,7 +180,7 @@ class RavenHandler extends AbstractProcessingHandler
         }
 
         if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) {
-            $options['extra']['message'] = $record['formatted'];
+            $options['message'] = $record['formatted'];
             $this->ravenClient->captureException($record['context']['exception'], $options);
         } else {
             $this->ravenClient->captureMessage($record['formatted'], array(), $options);