You are here

LoggerChannelFactoryInterface.php in Zircon Profile 8

Same filename and directory in other branches
  1. 8.0 core/lib/Drupal/Core/Logger/LoggerChannelFactoryInterface.php

Namespace

Drupal\Core\Logger

File

core/lib/Drupal/Core/Logger/LoggerChannelFactoryInterface.php
View source
<?php

/**
 * @file
 * Contains \Drupal\Core\Logger\LoggerChannelFactoryInterface.
 */
namespace Drupal\Core\Logger;

use Psr\Log\LoggerInterface;

/**
 * Logger channel factory interface.
 */
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);

}

Interfaces

Namesort descending Description
LoggerChannelFactoryInterface Logger channel factory interface.