mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-25 23:55:56 +03:00
[GH-ISSUE #2021] Add more control on infinite loop detection #862
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#862
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 @zamaldev on GitHub (Mar 2, 2026).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/2021
In my flow, I am using http requests pool to get information from third party. But when I trigger an error from response handler, sometimes I got an infinite loop detection error. As I understood, it is caused by nature of response handlers (pretty async IMO because even
dd()returns few results instead of one).And there is no easy workaround how to manage it. For now everything that we have is just option to disable it (which I don't want to do because there may be real infinite loop). I have tried to extends Logger, but there are bunch on private properties and constants, so I have to literally copy whole class for this. Which I don't want so much to do.
My proposition to add a bit more control on it. For example: manage the trigger depth of infinite loop. I would say to have an option to change 3 messages to 5 or 6 (should work for me) or even add some callback handler (like we have with exceptions).
Maybe something like that:
So in my case, I will have options to increase the depth (to allow more messages appear) or at least include the original message into warning (so I can have more information while debug).
Any thoughts?