コード例 #1
0
 public function testHandleBufferLimit()
 {
     $test = new TestHandler();
     $handler = new BufferHandler($test, 2);
     $handler->handle($this->getRecord(Logger::DEBUG));
     $handler->handle($this->getRecord(Logger::DEBUG));
     $handler->handle($this->getRecord(Logger::INFO));
     $handler->handle($this->getRecord(Logger::WARNING));
     $handler->close();
     $this->assertTrue($test->hasWarningRecords());
     $this->assertTrue($test->hasInfoRecords());
     $this->assertFalse($test->hasDebugRecords());
 }
コード例 #2
0
ファイル: LoggerFactory.php プロジェクト: evaneos/pyrite
 public function flushBuffer()
 {
     $this->bufferHandler->close();
 }