1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-24 10:06:08 +02:00

get record with highest log level in raven batch

This commit is contained in:
Florian Pfitzer
2013-10-03 11:57:48 +02:00
parent 4e85d26551
commit 8452da04da
2 changed files with 8 additions and 4 deletions

View File

@@ -80,10 +80,10 @@ 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']) {
$highest = $record;
return $highest;
return $record;
}
return $highest;
});
// the other ones are added as a context item