-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.x] Closes monolog handlers by event listener if the worker stops #854
Conversation
on-behalf-of: @e-solutions-GmbH <[email protected]>
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 |
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.