mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-11 15:44:34 +02:00
Added the possibility to configure whether the FingersCrossedHandler should continue to buffer after being triggered or not
The change is BC as the default is to stop buffering.
This commit is contained in:
@@ -52,6 +52,18 @@ class FingersCrossedHandlerTest extends TestCase
|
||||
$this->assertFalse($test->hasInfoRecords());
|
||||
}
|
||||
|
||||
public function testHandleRestartBufferingAfterBeingTriggered()
|
||||
{
|
||||
$test = new TestHandler();
|
||||
$handler = new FingersCrossedHandler($test, Logger::WARNING, 0, false, false);
|
||||
$handler->handle($this->getRecord(Logger::DEBUG));
|
||||
$handler->handle($this->getRecord(Logger::WARNING));
|
||||
$handler->handle($this->getRecord(Logger::INFO));
|
||||
$this->assertTrue($test->hasWarningRecords());
|
||||
$this->assertTrue($test->hasDebugRecords());
|
||||
$this->assertFalse($test->hasInfoRecords());
|
||||
}
|
||||
|
||||
public function testHandleBufferLimit()
|
||||
{
|
||||
$test = new TestHandler();
|
||||
|
Reference in New Issue
Block a user