mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-04 04:07:39 +02:00
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
This commit is contained in:
committed by
Jordi Boggiano
parent
c0eeca76fd
commit
22b92c7c00
@@ -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);
|
||||
|
Reference in New Issue
Block a user