1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 21:26:43 +02:00

Don't log exceptions twice

This commit is contained in:
David Windell
2013-05-24 18:09:40 +02:00
parent bda5757cde
commit 041b936b83

View File

@@ -71,15 +71,17 @@ class RavenHandler extends AbstractProcessingHandler
$options['extra']['extra'] = $record['extra'];
}
if ($record['level'] >= Logger::ERROR && isset($record['context']['exception'])) {
$this->ravenClient->captureException($record['context']['exception']);
return;
}
$this->ravenClient->captureMessage(
$record['formatted'],
array(), // $params - not used
version_compare(Raven_Client::VERSION, '0.1.0', '>') ? $options : $level, // $level or $options
false // $stack
);
if ($record['level'] >= Logger::ERROR && isset($record['context']['exception'])) {
$this->ravenClient->captureException($record['context']['exception']);
}
}
/**