Closed NiroDeveloper closed 4 months ago
Drafting until @nunomaduro can review.
@NiroDeveloper how did you decide it should be placed on WorkerStopping? Why not OperationTerminated?
The handler should be reused for every request / operation, so it should just call close()
at the end of the worker process.
There is already a FlushMonologState
listener that calls reset()
on the handler between every request, this is the correct behavior as descripted by monolog.
Thanks @NiroDeveloper
Fix for #850 Laravel uses Monolog for logging, some monolog handler have a important close() function. Octane does never call this function! In normal laravel applications, monolog calls close by itself via destruct(). It seams like destruct() is never called in Swoole, so close the handler manually per event.