LoggerChannelTrait

Wrapper methods for the logger factory service.

This utility trait should only be used in application-level code, such as classes that would implement ContainerInjectionInterface. Services registered in the Container should not use this trait but inject the appropriate service directly for easier testing.

Hierarchy

See also

\Drupal\Core\DependencyInjection\ContainerInjectionInterface

File

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

Namespace

Drupal\Core\Logger

Members

Name Modifiers Type Description
LoggerChannelTrait::$loggerFactory protected property The logger channel factory service.
LoggerChannelTrait::getLogger protected function Gets the logger for a specific channel.
LoggerChannelTrait::setLoggerFactory public function Injects the logger channel factory.
doc_Drupal
2016-10-29 09:25:03
Comments
Leave a Comment

Please login to continue.