Ver código fonte

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 anos atrás
pai
commit
22b92c7c00
1 arquivos alterados com 1 adições e 1 exclusões
  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);