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