1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-02-24 15:02:28 +01:00

Changed FingersCrossedHandler to use handleBatch when the buffer is triggered

This commit is contained in:
Christophe Coevoet 2011-05-07 01:19:54 +02:00
parent d7f98df9ab
commit 9b084240e9

View File

@ -62,9 +62,7 @@ class FingersCrossedHandler extends AbstractHandler
if (!$this->handler instanceof HandlerInterface) {
throw new \RuntimeException("The factory callback should return a HandlerInterface");
}
foreach ($this->buffer as $record) {
$this->handler->handle($record);
}
$this->handler->handleBatch($this->buffer);
$this->buffer = array();
}
} else {
@ -89,4 +87,4 @@ class FingersCrossedHandler extends AbstractHandler
{
throw new \BadMethodCallException('This method should not be called directly on the FingersCrossedHandler.');
}
}
}