mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 00:56:08 +02:00
Rework how exceptions are stored and accessed using suggestions from
@Seldaek in https://github.com/Seldaek/monolog/pull/76/files#r737312
This commit is contained in:
@@ -54,8 +54,8 @@ class RavenHandler extends AbstractProcessingHandler
|
||||
*/
|
||||
protected function write(array $record)
|
||||
{
|
||||
if ($record['level'] == Logger::ERROR) {
|
||||
$this->ravenClient->captureException($record['context']['context']);
|
||||
if ($record['level'] == Logger::ERROR && isset($record['context']['exception'])) {
|
||||
$this->ravenClient->captureException($record['context']['exception']);
|
||||
} else {
|
||||
$this->ravenClient->captureMessage(
|
||||
$record['formatted']['message'],
|
||||
|
Reference in New Issue
Block a user