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

If context has exactly 1000 items, do not truncate

This commit is contained in:
Minh-Quan TRAN
2017-08-17 17:11:16 +02:00
committed by Jordi Boggiano
parent 5f8783686e
commit ada5d30511
4 changed files with 60 additions and 4 deletions

View File

@@ -75,10 +75,11 @@ class NormalizerFormatter implements FormatterInterface
$count = 1;
foreach ($data as $key => $value) {
if ($count++ >= 1000) {
if ($count++ > 1000) {
$normalized['...'] = 'Over 1000 items ('.count($data).' total), aborting normalization';
break;
}
$normalized[$key] = $this->normalize($value);
}