mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 16:15:49 +03:00
[GH-ISSUE #991] HandlerWrapper isHandling() does not match Logger call to method. #402
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#402
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 @nesl247 on GitHub (May 24, 2017).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/991
In
Logger::addRecord()(https://github.com/Seldaek/monolog/blob/master/src/Monolog/Logger.php#L285) it callsHandlerInterface::isHandling()with only the level, not the record. WhileHandlerInterfacedoes state this is correct, which is unfortunate,HandlerWrapperseems to be oblivious to this.See https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/HandlerWrapper.php#L21 in which it states you can make different checks against the record. Unfortunately, since it's only the level,
HandlerWrapperseems pretty useless according to it's documentation. It looks likehandle()needs to actually be overwritten in order to make that determination.@Seldaek commented on GitHub (Jun 18, 2017):
Soo... override handle then if you have to override handle? I mean I agree the example is a bit silly but it's just an example, the class can be used to override any method.