mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-05 12:47:39 +02:00
Merge pull request #635 from mbrevda/master
Allow extra_data and payload to be sent, too
This commit is contained in:
@@ -54,7 +54,16 @@ class RollbarHandler extends AbstractProcessingHandler
|
||||
protected function write(array $record)
|
||||
{
|
||||
if (isset($record['context']['exception']) && $record['context']['exception'] instanceof Exception) {
|
||||
$this->rollbarNotifier->report_exception($record['context']['exception']);
|
||||
$context = $record;
|
||||
$exception = $context['exception'];
|
||||
unset($context['exception']);
|
||||
|
||||
$payload = isset($context['payload']) ? $context['payload'] : [];
|
||||
if (isset($context['payload'])) {
|
||||
unset($context['payload']);
|
||||
}
|
||||
|
||||
$this->rollbarNotifier->report_exception($exception, $context, $payload);
|
||||
} else {
|
||||
$extraData = array(
|
||||
'level' => $record['level'],
|
||||
|
Reference in New Issue
Block a user