You are here

interface HttpblLogTrapperInterface in http:BL 8

(An arbitrated logger)

HttpblLogTrapperInterface mimics LoggerInterface, adding a param that filters messages according to the Httpbl config setting for log volume ($logVolume). This allows verbose logging to be unconditionally added as needed, but then only passed on to the actual logger when the settings conditions apply.

The $logVolume param is NOT passed on when actual logging occurs.

The functions are all based on log levels compliant to RFC 5424 integers:

EMERGENCY = 0, ALERT = 1, CRITICAL = 2, ERROR = 3, WARNING = 4, NOTICE = 5, INFO = 6, DEBUG = 7.

Log volume filtering scheme: HTTPBL_LOG_QUIET = LogVolume 0 - Quiet - Passes levels 0 -- 3 HTTPBL_LOG_MIN = LogVolume 1 - Minimal - Passes levels 0 -- 5 HTTPBL_LOG_VERBOSE = LogVolume 2 - Verbose - Passes levels 0 -- 7

Hierarchy

Expanded class hierarchy of HttpblLogTrapperInterface

All classes that implement HttpblLogTrapperInterface

See also

\Drupal\Core\Logger\RfcLogLevel

11 files declare their use of HttpblLogTrapperInterface
HostDeleteForm.php in src/Form/HostDeleteForm.php
HostForm.php in src/Form/HostForm.php
HostMultipleBanConfirm.php in src/Form/HostMultipleBanConfirm.php
HostMultipleDeleteConfirm.php in src/Form/HostMultipleDeleteConfirm.php
HostMultipleGreylistConfirm.php in src/Form/HostMultipleGreylistConfirm.php

... See full list

File

src/Logger/HttpblLogTrapperInterface.php, line 29

Namespace

Drupal\httpbl\Logger
View source
interface HttpblLogTrapperInterface {

  /**
   * Traps and forwards EMERGENCY messages, based on config setting.
   *
   * @param string $message
   * @param array $context
   * @param integer $logVolume,
   *   The minimum setting required to pass on the message.
   * @return null
   */
  public function trapEmergency($message, array $context = array(), $logVolume = HTTPBL_LOG_QUIET);

  /**
   * Traps and forwards ALERT messages, based on config setting.
   *
   * @param string $message
   * @param array $context
   * @param integer $logVolume,
   *   The minimum setting required to pass on the message.
   * @return null
   */
  public function trapAlert($message, array $context = array(), $logVolume = HTTPBL_LOG_QUIET);

  /**
   * Traps and forwards CRITICAL messages, based on config setting.
   *
   * @param string $message
   * @param array $context
   * @param integer $logVolume,
   *   The minimum setting required to pass on the message.
   * @return null
   */
  public function trapCritical($message, array $context = array(), $logVolume = HTTPBL_LOG_QUIET);

  /**
   * Traps and forwards ERROR messages, based on config setting.
   *
   * @param string $message
   * @param array $context
   * @param integer $logVolume,
   *   The minimum setting required to pass on the message.
   * @return null
   */
  public function trapError($message, array $context = array(), $logVolume = HTTPBL_LOG_QUIET);

  /**
   * Traps and forwards WARNING messages, based on config setting.
   *
   * @param string $message
   * @param array $context
   * @param integer $logVolume,
   *   The minimum setting required to pass on the message.
   * @return null
   */
  public function trapWarning($message, array $context = array(), $logVolume = HTTPBL_LOG_MIN);

  /**
   * Traps and forwards NOTICE messages, based on config setting.
   *
   * @param string $message
   * @param array $context
   * @param integer $logVolume,
   *   The minimum setting required to pass on the message.
   * @return null
   */
  public function trapNotice($message, array $context = array(), $logVolume = HTTPBL_LOG_MIN);

  /**
   * Traps and forwards INFO messages, based on config setting.
   *
   * @param string $message
   * @param array $context
   * @param integer $logVolume,
   *   The minimum setting required to pass on the message.
   * @return null
   */
  public function trapInfo($message, array $context = array(), $logVolume = HTTPBL_LOG_VERBOSE);

  /**
   * Traps and forwards DEBUG messages, based on config setting.
   *
   * @param string $message
   * @param array $context
   * @param integer $logVolume,
   *   The minimum setting required to pass on the message.
   * @return null
   */
  public function trapDebug($message, array $context = array(), $logVolume = HTTPBL_LOG_VERBOSE);

  /**
   * {@inheritdoc}
   */
  public function log($level, $message, array $context = array());

}

Members

Namesort descending Modifiers Type Description Overrides
HttpblLogTrapperInterface::log public function 1
HttpblLogTrapperInterface::trapAlert public function Traps and forwards ALERT messages, based on config setting. 2
HttpblLogTrapperInterface::trapCritical public function Traps and forwards CRITICAL messages, based on config setting. 2
HttpblLogTrapperInterface::trapDebug public function Traps and forwards DEBUG messages, based on config setting. 2
HttpblLogTrapperInterface::trapEmergency public function Traps and forwards EMERGENCY messages, based on config setting. 2
HttpblLogTrapperInterface::trapError public function Traps and forwards ERROR messages, based on config setting. 2
HttpblLogTrapperInterface::trapInfo public function Traps and forwards INFO messages, based on config setting. 2
HttpblLogTrapperInterface::trapNotice public function Traps and forwards NOTICE messages, based on config setting. 2
HttpblLogTrapperInterface::trapWarning public function Traps and forwards WARNING messages, based on config setting. 2