public function LoggerChannelPart::alert in Purge 8.3
Logs only when granted \Drupal\Core\Logger\RfcLogLevel::EMERGENCY.
Overrides LoggerChannelPartInterface::alert
File
- src/
Logger/ LoggerChannelPart.php, line 92
Class
- LoggerChannelPart
- Provides a subchannel whichs logs to a single main channel with permissions.
Namespace
Drupal\purge\LoggerCode
public function alert($message, array $context = []) {
if ($this->access[RfcLogLevel::ALERT]) {
$this
->log(LogLevel::ALERT, $message, $context);
}
}