8.5.x LoggerChannelTrait.php LoggerChannelTrait::setLoggerFactory(LoggerChannelFactoryInterface $logger_factory)
8.2.x LoggerChannelTrait.php LoggerChannelTrait::setLoggerFactory(LoggerChannelFactoryInterface $logger_factory)
8.3.x LoggerChannelTrait.php LoggerChannelTrait::setLoggerFactory(LoggerChannelFactoryInterface $logger_factory)
8.4.x LoggerChannelTrait.php LoggerChannelTrait::setLoggerFactory(LoggerChannelFactoryInterface $logger_factory)
8.6.x LoggerChannelTrait.php LoggerChannelTrait::setLoggerFactory(LoggerChannelFactoryInterface $logger_factory)

Injects the logger channel factory.

Parameters

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The logger channel factory service.

Return value

$this

File

core/lib/Drupal/Core/Logger/LoggerChannelTrait.php, line 52

Class

LoggerChannelTrait
Wrapper methods for the logger factory service.

Namespace

Drupal\Core\Logger

Code

public function setLoggerFactory(LoggerChannelFactoryInterface $logger_factory) {
  $this->loggerFactory = $logger_factory;
  return $this;
}