1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 01:26:11 +02:00
This commit is contained in:
Jordi Boggiano
2013-07-29 00:08:51 +02:00
parent e2e041eded
commit 4277c5db4a
7 changed files with 35 additions and 30 deletions

View File

@@ -69,7 +69,7 @@ class RavenHandler extends AbstractProcessingHandler
$level = $this->level;
// filter records based on their level
$records = array_filter($records, function($record) use($level) {
$records = array_filter($records, function($record) use ($level) {
return $record['level'] >= $level;
});
@@ -79,7 +79,7 @@ class RavenHandler extends AbstractProcessingHandler
// the record with the highest severity is the "main" one
$record = array_reduce($records, function($highest, $record) {
if($record['level'] >= $highest['level']) {
if ($record['level'] >= $highest['level']) {
$highest = $record;
return $highest;
@@ -140,6 +140,7 @@ class RavenHandler extends AbstractProcessingHandler
if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Exception) {
$options['extra']['message'] = $record['formatted'];
$this->ravenClient->captureException($record['context']['exception'], $options);
return;
}