mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-23 09:36:11 +02:00
Simplified formatBatchNewlines()
This commit is contained in:
@@ -93,13 +93,7 @@ class JsonFormatter implements FormatterInterface
|
||||
*/
|
||||
protected function formatBatchNewlines(array $records)
|
||||
{
|
||||
$instance = $this;
|
||||
|
||||
array_walk($records, function(&$value, $key) use ($instance) {
|
||||
$value = $instance->format($value);
|
||||
});
|
||||
|
||||
return implode("\n", $records);
|
||||
return implode(PHP_EOL, array_map($records, array($this, 'format')));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user