Psr\Log\LoggerInterface::alert PHP Method

alert() public method

Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
public alert ( string $message, array $context = [] ) : null
$message string
$context array
return null
    public function alert($message, array $context = array());

Usage Example

コード例 #1
0
 /**
  * Action must be taken immediately.
  *
  * Example: Entire website down, database unavailable, etc. This should
  * trigger the SMS alerts and wake you up.
  *
  * @param string $message
  * @param array $context
  * @return null
  */
 public function alert($message, array $context = array())
 {
     if ($this->logger) {
         $context = $this->getLoggerContext($context);
         $this->logger->alert($message, $context);
     }
 }
All Usage Examples Of Psr\Log\LoggerInterface::alert