mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 08:05:53 +03:00
[GH-ISSUE #201] Infinit loop when use NormalizerFormatter with infinit Traversable obj #67
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#67
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bronze1man on GitHub (Jun 7, 2013).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/201
I enter a Infinit loop when use NormalizerFormatter with infinit Traversable obj.
NormalizerFormatter::normalize will travel through all item in it.
I think NormalizerFormatter::normalize should travel through first 10 items.
May be I should not use Traversable interface on some obj with infinit items?
@Seldaek commented on GitHub (Jun 7, 2013):
The question is indeed at which point do we stop. 10 items sounds not enough, 100 is probably good enough for most usages, but it might bother someone else. I'll patch it to stop at 1000 items for now, which should at least resolve your infinite loop problem. That said yeah I am not sure if giving an infinite item to the log is a great idea :) Maybe you could normalize it upfront if you know about it.
@bronze1man commented on GitHub (Jun 11, 2013):
thanks.