예제 #1
0
파일: Pool.php 프로젝트: phlib/logger
 /**
  * @param string $name
  * @return Collection
  */
 public function getLoggerCollection($name)
 {
     $logger = $this->getLogger($name);
     if (!$logger instanceof Collection) {
         $logger = $this->loggerFactory->createCollectionLogger($name, ['loggers' => [$logger]]);
     }
     return $logger;
 }
예제 #2
0
 /**
  * @expectedException \DomainException
  * @expectedExceptionMessageRegExp /at index 0$/
  */
 public function testCreateCollectionLoggerWithInvalidConfig()
 {
     $invalidConfig = ['type' => '(invalid)'];
     $factory = new Factory();
     $factory->createCollectionLogger('test', ['loggers' => [$invalidConfig]]);
 }