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
- trait \Drupal\Core\Logger\LoggerChannelTrait
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. |
Please login to continue.