You are here

public function Redirect404LogSuppressor::addLogger in Redirect 8

Adds a logger to all the channels.

Parameters

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

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

Overrides LoggerChannelFactoryInterface::addLogger

See also

\Symfony\Component\HttpKernel\DependencyInjection\LoggerPass

File

modules/redirect_404/src/Render/Redirect404LogSuppressor.php, line 61

Class

Redirect404LogSuppressor
Allows 'page not found' events to be suppressed by returning a NullLogger.

Namespace

Drupal\redirect_404\Render

Code

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