コード例 #1
0
 /**
  * Checks whether the message level is below the appender's threshold. 
  *
  * If there is no threshold set, then the return value is always <i>true</i>.
  * 
  * @param LoggerLevel $level
  * @return boolean Returns true if level is greater or equal than 
  *   threshold, or if the threshold is not set. Otherwise returns false.
  */
 public function isAsSevereAsThreshold($level)
 {
     if ($this->threshold === null) {
         return true;
     }
     return $level->isGreaterOrEqual($this->getThreshold());
 }
コード例 #2
0
ファイル: Logger.php プロジェクト: iLoiLohas/pinchshopper
 /**
  * Check whether this Logger is enabled for a given Level passed as parameter.
  *
  * @param LoggerLevel $level
  * @return boolean
  */
 public function isEnabledFor($level)
 {
     return (bool) $level->isGreaterOrEqual($this->getEffectiveLevel());
 }
コード例 #3
0
ファイル: Logger.php プロジェクト: Lyonard/PHPExperiments
 /**
  * Check whether this Logger is enabled for a given Level passed as parameter.
  *
  * @param LoggerLevel level
  * @return boolean
  */
 public function isEnabledFor(LoggerLevel $level)
 {
     return $level->isGreaterOrEqual($this->getEffectiveLevel());
 }
コード例 #4
0
 /**
  * Check whether the message level is below the appender's threshold. 
  *
  *
  * If there is no threshold set, then the return value is always <i>true</i>.
  * @param LoggerLevel $priority
  * @return boolean true if priority is greater or equal than threshold  
  */
 function isAsSevereAsThreshold($priority)
 {
     if ($this->threshold === null) {
         return true;
     }
     return $priority->isGreaterOrEqual($this->getThreshold());
 }