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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user