mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 08:05:53 +03:00
[GH-ISSUE #91] Buffer handler not working as expected on php 5.3.10 #33
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#33
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Shreef on GitHub (Jun 14, 2012).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/91
The Buffer handler depends on the
__destruct()method to push the buffered records to the sub-handler. looks like this doesn't always work on PHP 5.3.10 as destructors don't run on shutdowns caused by fatal errors.the solution would require adding this line to the constructor of the
AbstractHandler@Seldaek commented on GitHub (Jun 14, 2012):
It's not a bad idea, but I'm not sure if that would work very well, because then it keeps a reference to the object, which means it won't be destructed until the very end, and that means if it has any dependencies to be able to send the logs, it might just fail. I'd feel more comfortable adding that only to the buffer handler and not to the abstract one.
@Shreef commented on GitHub (Jun 14, 2012):
@Seldaek
Ok, makes sense
@stof commented on GitHub (Jun 14, 2012):
I would also register the close method directly instead of the magic function
@Shreef commented on GitHub (Jun 14, 2012):
Cool. I hope you can implement the solution and close the issue. if you need me to send a pull request or something, just let me know.
@Seldaek commented on GitHub (Jun 14, 2012):
@Shreef if you don't mind sending a PR, that'd be great.