コード例 #1
0
ファイル: Writer.php プロジェクト: narrowspark/framework
 /**
  * {@inheritdoc}
  */
 public function useDailyFiles(string $path, int $days = 0, string $level = 'debug', $processor = null, $formatter = null)
 {
     $this->handlerParser->parseHandler(new RotatingFileHandler($path, $days, $this->parseLevel($level)), '', '', $processor, $formatter);
 }
コード例 #2
0
ファイル: HandlerParserTest.php プロジェクト: viserio/log
 /**
  * @dataProvider formatterProvider
  */
 public function testParseHandlerWithFormatterWithDataProvider($formatter)
 {
     $logger = $this->mock(Logger::class);
     $logger->shouldReceive('pushHandler')->once()->andReturn(HandlerInterface::class);
     $handler = $this->mock(HandlerInterface::class);
     $handler->shouldReceive('setFormatter')->once();
     $parser = new HandlerParser($logger);
     $parser->parseHandler($handler, '', 'info', null, $formatter);
 }