notice() public method

public notice ( $message, array $context = [] )
$context array
コード例 #1
0
 /**
  * @param mixed $level
  * @param string $message
  * @param array $context
  * @return null
  * @throws PsrInvalidArgumentException
  */
 public function log($level, $message, array $context = array())
 {
     switch ($level) {
         case PsrLogLevel::ALERT:
             $this->symfonyLogger->alert($message, $context);
             break;
         case PsrLogLevel::CRITICAL:
             $this->symfonyLogger->crit($message, $context);
             break;
         case PsrLogLevel::DEBUG:
             $this->symfonyLogger->debug($message, $context);
             break;
         case PsrLogLevel::EMERGENCY:
             $this->symfonyLogger->emerg($message, $context);
             break;
         case PsrLogLevel::ERROR:
             $this->symfonyLogger->err($message, $context);
             break;
         case PsrLogLevel::INFO:
             $this->symfonyLogger->info($message, $context);
             break;
         case PsrLogLevel::NOTICE:
             $this->symfonyLogger->notice($message, $context);
             break;
         case PsrLogLevel::WARNING:
             $this->symfonyLogger->warn($message, $context);
             break;
         default:
             throw new PsrInvalidArgumentException(sprintf('Loglevel "%s" not valid, use constants from "%s"', $level, "Psr\\Log\\LogLevel"));
             break;
     }
     return null;
 }
コード例 #2
0
ファイル: PropelLogger.php プロジェクト: laubosslink/lab
 /**
  * A convenience function for logging an critical event.
  *
  * @param mixed $message the message to log.
  */
 public function notice($message)
 {
     if (null !== $this->logger) {
         $this->logger->notice($message);
     }
 }
コード例 #3
0
ファイル: PropelLogger.php プロジェクト: rozwell/PropelBundle
 /**
  * A convenience function for logging an critical event.
  *
  * @param mixed $message the message to log.
  */
 public function notice($message)
 {
     $this->logger->notice($message);
 }