DATA-DOG / DataDogAuditBundle

Stores all database changes for doctrine ORM
MIT License
135 stars 63 forks source link

"Maximum function nesting level" php recursion error when using this bundle and flushing more than 256 times in a script. #79

Open d-ph opened 2 years ago

d-ph commented 2 years ago

Hello,

This leads to

Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Maximum function nesting level of '256' reached, aborting! in /srv/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php on line 31

Symfony\Component\Debug\Exception\FatalThrowableError: Maximum function nesting level of '256' reached, aborting! in /srv/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php on line 31

when a one is flushing more than 256 times in a script, while using this bundle. One can see in the stack trace a long chain of LoggerChain.php instances, which at some point trips the php's configured max recursion level.

There are use cases when one needs to flush a lot in a script.

Fyi.