You are here

interface LoggerChannelPartInterface in Purge 8.3

Describes a subchannel whichs logs to a single main channel with permissions.

Hierarchy

Expanded class hierarchy of LoggerChannelPartInterface

All classes that implement LoggerChannelPartInterface

File

src/Logger/LoggerChannelPartInterface.php, line 10

Namespace

Drupal\purge\Logger
View source
interface LoggerChannelPartInterface extends LoggerInterface {

  /**
   * Construct \Drupal\purge\Logger\LoggerChannelPartInterface.
   *
   * @param \Psr\Log\LoggerInterface $logger_channel_purge
   *   The single and central logger channel used by purge module(s).
   * @param string $id
   *   The identifier of the channel part.
   * @param int[] $grants
   *   Unassociative array of RFC 5424 log types. Each passed type grants the
   *   channel permission to log that type of message, without specific
   *   permissions the logger will stay silent for that type.
   *
   *   Grants available:
   *    - \Drupal\Core\Logger\RfcLogLevel::EMERGENCY
   *    - \Drupal\Core\Logger\RfcLogLevel::ALERT
   *    - \Drupal\Core\Logger\RfcLogLevel::CRITICAL
   *    - \Drupal\Core\Logger\RfcLogLevel::ERROR
   *    - \Drupal\Core\Logger\RfcLogLevel::WARNING
   *    - \Drupal\Core\Logger\RfcLogLevel::NOTICE
   *    - \Drupal\Core\Logger\RfcLogLevel::INFO
   *    - \Drupal\Core\Logger\RfcLogLevel::DEBUG.
   */
  public function __construct(LoggerInterface $logger_channel_purge, $id, array $grants = []);

  /**
   * Retrieve given grants.
   *
   * @return int[]
   *   Unassociative array of enabled RFC 5424 log types:
   *    - \Drupal\Core\Logger\RfcLogLevel::EMERGENCY
   *    - \Drupal\Core\Logger\RfcLogLevel::ALERT
   *    - \Drupal\Core\Logger\RfcLogLevel::CRITICAL
   *    - \Drupal\Core\Logger\RfcLogLevel::ERROR
   *    - \Drupal\Core\Logger\RfcLogLevel::WARNING
   *    - \Drupal\Core\Logger\RfcLogLevel::NOTICE
   *    - \Drupal\Core\Logger\RfcLogLevel::INFO
   *    - \Drupal\Core\Logger\RfcLogLevel::DEBUG.
   */
  public function getGrants();

  /**
   * Determine whether this channel has a RfcLogLevel::DEBUG grant.
   *
   * @return bool
   *   Whether debugging is enabled.
   */
  public function isDebuggingEnabled();

  /**
   * {@inheritdoc}
   *
   * Logs only when granted \Drupal\Core\Logger\RfcLogLevel::EMERGENCY.
   */
  public function emergency($message, array $context = []);

  /**
   * {@inheritdoc}
   *
   * Logs only when granted \Drupal\Core\Logger\RfcLogLevel::EMERGENCY.
   */
  public function alert($message, array $context = []);

  /**
   * {@inheritdoc}
   *
   * Logs only when granted \Drupal\Core\Logger\RfcLogLevel::CRITICAL.
   */
  public function critical($message, array $context = []);

  /**
   * {@inheritdoc}
   *
   * Logs only when granted \Drupal\Core\Logger\RfcLogLevel::ERROR.
   */
  public function error($message, array $context = []);

  /**
   * {@inheritdoc}
   *
   * Logs only when granted \Drupal\Core\Logger\RfcLogLevel::WARNING.
   */
  public function warning($message, array $context = []);

  /**
   * {@inheritdoc}
   *
   * Logs only when granted \Drupal\Core\Logger\RfcLogLevel::NOTICE.
   */
  public function notice($message, array $context = []);

  /**
   * {@inheritdoc}
   *
   * Logs only when granted \Drupal\Core\Logger\RfcLogLevel::INFO.
   */
  public function info($message, array $context = []);

  /**
   * {@inheritdoc}
   *
   * Logs only when granted \Drupal\Core\Logger\RfcLogLevel::DEBUG.
   */
  public function debug($message, array $context = []);

  /**
   * {@inheritdoc}
   *
   * Prefixes messages with the channel ID so that the origin can be traced.
   */
  public function log($level, $message, array $context = []);

}

Members

Namesort descending Modifiers Type Description Overrides
LoggerChannelPartInterface::alert public function Logs only when granted \Drupal\Core\Logger\RfcLogLevel::EMERGENCY. 1
LoggerChannelPartInterface::critical public function Logs only when granted \Drupal\Core\Logger\RfcLogLevel::CRITICAL. 1
LoggerChannelPartInterface::debug public function Logs only when granted \Drupal\Core\Logger\RfcLogLevel::DEBUG. 1
LoggerChannelPartInterface::emergency public function Logs only when granted \Drupal\Core\Logger\RfcLogLevel::EMERGENCY. 1
LoggerChannelPartInterface::error public function Logs only when granted \Drupal\Core\Logger\RfcLogLevel::ERROR. 1
LoggerChannelPartInterface::getGrants public function Retrieve given grants. 1
LoggerChannelPartInterface::info public function Logs only when granted \Drupal\Core\Logger\RfcLogLevel::INFO. 1
LoggerChannelPartInterface::isDebuggingEnabled public function Determine whether this channel has a RfcLogLevel::DEBUG grant. 1
LoggerChannelPartInterface::log public function Prefixes messages with the channel ID so that the origin can be traced. 1
LoggerChannelPartInterface::notice public function Logs only when granted \Drupal\Core\Logger\RfcLogLevel::NOTICE. 1
LoggerChannelPartInterface::warning public function Logs only when granted \Drupal\Core\Logger\RfcLogLevel::WARNING. 1
LoggerChannelPartInterface::__construct public function Construct \Drupal\purge\Logger\LoggerChannelPartInterface. 1