How to disable script based monologue?

we have quite large data import scripts (Symfony "Commands") that fail due to Monolog's lack of memory (vendor \ monolog \ src \ Monolog \ Formatter \ LineFormatter.php on line 58). we use Monolog as a whole, so we would not like to completely disable it.

+3
source share
2 answers

I understand that this is an old question, but when I ran into problems with the long-term use of Monolog using a script that generated errors in memory, it turned out that the problem was handled by Monolog's finger_crossed handler, the log messages.

I solved the problem by setting the buffer_size variable for the Monolog handler in question. Something like that:

main:
    type:         fingers_crossed
    action_level: info
    buffer_size:  200
    handler:      nested

: , buffer_size : " , , ".

+3

prod Doctrine, , . $logger->popHandler(). , , .

, .

XHProf XDebug, , . , script - , ( - ).

+1

All Articles