mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-08 06:06:40 +02:00
Don't log exceptions twice
This commit is contained in:
@@ -71,15 +71,17 @@ class RavenHandler extends AbstractProcessingHandler
|
|||||||
$options['extra']['extra'] = $record['extra'];
|
$options['extra']['extra'] = $record['extra'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($record['level'] >= Logger::ERROR && isset($record['context']['exception'])) {
|
||||||
|
$this->ravenClient->captureException($record['context']['exception']);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->ravenClient->captureMessage(
|
$this->ravenClient->captureMessage(
|
||||||
$record['formatted'],
|
$record['formatted'],
|
||||||
array(), // $params - not used
|
array(), // $params - not used
|
||||||
version_compare(Raven_Client::VERSION, '0.1.0', '>') ? $options : $level, // $level or $options
|
version_compare(Raven_Client::VERSION, '0.1.0', '>') ? $options : $level, // $level or $options
|
||||||
false // $stack
|
false // $stack
|
||||||
);
|
);
|
||||||
if ($record['level'] >= Logger::ERROR && isset($record['context']['exception'])) {
|
|
||||||
$this->ravenClient->captureException($record['context']['exception']);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user