mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-23 09:36:11 +02:00
Fix Buffer, Group and FingersCrossed handlers to make use of their processors, fixes #170
This commit is contained in:
@@ -65,6 +65,12 @@ class BufferHandler extends AbstractHandler
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->processors) {
|
||||
foreach ($this->processors as $processor) {
|
||||
$record = call_user_func($processor, $record);
|
||||
}
|
||||
}
|
||||
|
||||
$this->buffer[] = $record;
|
||||
$this->bufferSize++;
|
||||
|
||||
|
@@ -69,6 +69,12 @@ class FingersCrossedHandler extends AbstractHandler
|
||||
*/
|
||||
public function handle(array $record)
|
||||
{
|
||||
if ($this->processors) {
|
||||
foreach ($this->processors as $processor) {
|
||||
$record = call_user_func($processor, $record);
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->buffering) {
|
||||
$this->buffer[] = $record;
|
||||
if ($this->bufferSize > 0 && count($this->buffer) > $this->bufferSize) {
|
||||
|
@@ -55,6 +55,12 @@ class GroupHandler extends AbstractHandler
|
||||
*/
|
||||
public function handle(array $record)
|
||||
{
|
||||
if ($this->processors) {
|
||||
foreach ($this->processors as $processor) {
|
||||
$record = call_user_func($processor, $record);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->handlers as $handler) {
|
||||
$handler->handle($record);
|
||||
}
|
||||
|
Reference in New Issue
Block a user