You are here

public function LoggerChannel::addLogger in Service Container 7

Same name and namespace in other branches
  1. 7.2 src/Logger/LoggerChannel.php \Drupal\service_container\Logger\LoggerChannel::addLogger()

Adds a logger.

Parameters

\Psr\Log\LoggerInterface $logger: The PSR-3 logger to add.

int $priority: The priority of the logger being added.

Overrides LoggerChannelInterface::addLogger

File

src/Logger/LoggerChannel.php, line 80
Contains \Drupal\service_container\Logger\LoggerChannel.

Class

LoggerChannel
Defines a logger channel that most implementations will use.

Namespace

Drupal\service_container\Logger

Code

public function addLogger(LoggerInterface $logger, $priority = 0) {
  $this->loggers[$priority][] = $logger;
}