php-pm / php-pm-httpkernel

HttpKernel adapter for use of Symfony and Laravel frameworks with PHP-PM
MIT License
246 stars 72 forks source link

Monolog BufferHandler does not flush at the end of the request #134

Closed dnna closed 4 years ago

dnna commented 6 years ago

This handler flushes using a register_shutdown_function, which is never triggered with PPM. We need to find a way to call the flush() function of the handler (and maybe any other Monolog handlers that have it?) at the end of the request.

andig commented 6 years ago

Interesting finding. Maybe we should look at shutdown functions at the end of each request and invoke all?

dnna commented 6 years ago

I'm not sure if its possible to iterate the shutdown functions in PHP code, I don't think they are exposed (closest I found was https://stackoverflow.com/questions/3140257/list-of-registered-shutdown-functions).

I was thinking of handling it on the framework's bootstrap, but then it will have to be handled for each framework separately.

andig commented 4 years ago

Should have been fixed by #279