You are here

public function HttpblLogTrapper::trapEmergency in http:BL 8

Same name in this branch
  1. 8 src/Logger/HttpblLogTrapper.php \Drupal\httpbl\Logger\HttpblLogTrapper::trapEmergency()
  2. 8 src/ProxyClass/Logger/HttpblLogTrapper.php \Drupal\httpbl\ProxyClass\Logger\HttpblLogTrapper::trapEmergency()

Traps and forwards EMERGENCY messages, based on config setting.

Parameters

string $message:

array $context:

integer $logVolume,: The minimum setting required to pass on the message.

Return value

null

Overrides HttpblLogTrapperInterface::trapEmergency

File

src/Logger/HttpblLogTrapper.php, line 68

Class

HttpblLogTrapper
(An arbitrated logger)

Namespace

Drupal\httpbl\Logger

Code

public function trapEmergency($message, array $context = array(), $logVolume = HTTPBL_LOG_QUIET) {

  // Only pass message if logVolume meets or exceeds the minimum to pass on.
  if (\Drupal::state()
    ->get('httpbl.log') >= $logVolume) {
    $this
      ->log(RfcLogLevel::EMERGENCY, $message, $context);
  }
}