Skip to content

Commit

Permalink
Pass context to RollBar
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrevda committed Aug 22, 2015
1 parent d587556 commit a4033bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Monolog/Handler/RollbarHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ public function __construct(RollbarNotifier $rollbarNotifier, $level = Logger::E
protected function write(array $record)
{
if (isset($record['context']['exception']) && $record['context']['exception'] instanceof Exception) {
$this->rollbarNotifier->report_exception($record['context']['exception']);
$context = $record['context'];
unset($context['exception']);
$this->rollbarNotifier->report_exception($record['context']['exception'], $context);
} else {
$extraData = array(
'level' => $record['level'],
Expand Down

0 comments on commit a4033bf

Please sign in to comment.