/**
  * Checks whether the Logger has a handler that listens on the given level
  *
  * @param integer $level
  * @return Boolean 
  * @static 
  */
 public static function isHandling($level)
 {
     return \Monolog\Logger::isHandling($level);
 }
Пример #2
0
 /**
  * @covers Monolog\Logger::isHandling
  */
 public function testIsHandling()
 {
     $logger = new Logger(__METHOD__);
     $handler1 = $this->getMock('Monolog\\Handler\\HandlerInterface');
     $handler1->expects($this->any())->method('isHandling')->will($this->returnValue(false));
     $logger->pushHandler($handler1);
     $this->assertFalse($logger->isHandling(Logger::DEBUG));
     $handler2 = $this->getMock('Monolog\\Handler\\HandlerInterface');
     $handler2->expects($this->any())->method('isHandling')->will($this->returnValue(true));
     $logger->pushHandler($handler2);
     $this->assertTrue($logger->isHandling(Logger::DEBUG));
 }
Пример #3
0
 /**
  * @param int $level
  * @return bool
  */
 public function isHandling($level)
 {
     return parent::isHandling($level);
 }