You are here

interface LoggerChannelFactoryInterface in Service Container 7

Same name and namespace in other branches
  1. 7.2 lib/Drupal/Core/Logger/LoggerChannelFactoryInterface.php \Drupal\Core\Logger\LoggerChannelFactoryInterface

Logger channel factory interface.

Hierarchy

Expanded class hierarchy of LoggerChannelFactoryInterface

All classes that implement LoggerChannelFactoryInterface

1 file declares its use of LoggerChannelFactoryInterface
LoggerChannelFactory.php in src/Logger/LoggerChannelFactory.php
Contains \Drupal\service_container\Logger\LoggerChannelFactory.

File

lib/Drupal/Core/Logger/LoggerChannelFactoryInterface.php, line 15
Contains \Drupal\Core\Logger\LoggerChannelFactoryInterface.

Namespace

Drupal\Core\Logger
View source
interface LoggerChannelFactoryInterface {

  /**
   * Retrieves the registered logger for the requested channel.
   *
   * @return \Drupal\Core\Logger\LoggerChannelInterface
   *   The registered logger for this channel.
   */
  public function get($channel);

  /**
   * Adds a logger.
   *
   * Here is were all services tagged as 'logger' are being retrieved and then
   * passed to the channels after instantiation.
   *
   * @param \Psr\Log\LoggerInterface $logger
   *   The PSR-3 logger to add.
   * @param int $priority
   *   The priority of the logger being added.
   *
   * @see \Drupal\Core\DependencyInjection\Compiler\RegisterLoggersPass
   */
  public function addLogger(LoggerInterface $logger, $priority = 0);

}

Members

Namesort descending Modifiers Type Description Overrides
LoggerChannelFactoryInterface::addLogger public function Adds a logger. 1
LoggerChannelFactoryInterface::get public function Retrieves the registered logger for the requested channel. 1