Skip to content

Commit 0e396fc

Browse files
Merge pull request #26 from paulrrogers/laravel-v5-5-workaround
Fix Laravel 5.5 missing traces by shifting exception back into 'message'
2 parents 07d9384 + 5d580b4 commit 0e396fc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/RollbarLogHandler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ public function log($level, $message, array $context = [])
7575

7676
$context = $this->addContext($context);
7777

78+
// Workaround Laravel 5.5 moving exception from message into context
79+
if (! empty($context['exception']) && is_string($message)) {
80+
$message = $context['exception'];
81+
}
82+
7883
return $this->logger->log($level, $message, $context);
7984
}
8085

0 commit comments

Comments
 (0)