LoggerChannelFactoryInterface.php

Same filename in other branches
  1. 9 core/lib/Drupal/Core/Logger/LoggerChannelFactoryInterface.php
  2. 10 core/lib/Drupal/Core/Logger/LoggerChannelFactoryInterface.php
  3. 11.x core/lib/Drupal/Core/Logger/LoggerChannelFactoryInterface.php

Namespace

Drupal\Core\Logger

File

core/lib/Drupal/Core/Logger/LoggerChannelFactoryInterface.php

View source
<?php

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 to all the channels.
     *
     * @param \Psr\Log\LoggerInterface $logger
     *   The PSR-3 logger to add.
     * @param int $priority
     *   The priority of the logger being added.
     *
     * @see \Symfony\Component\HttpKernel\DependencyInjection\LoggerPass
     */
    public function addLogger(LoggerInterface $logger, $priority = 0);

}

Interfaces

Title Deprecated Summary
LoggerChannelFactoryInterface Logger channel factory interface.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.