You are here

public function TmgmtSmartlingLogSettingsServiceProvider::alter in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 modules/tmgmt_smartling_log_settings/src/TmgmtSmartlingLogSettingsServiceProvider.php \Drupal\tmgmt_smartling_log_settings\TmgmtSmartlingLogSettingsServiceProvider::alter()

Modifies existing service definitions.

Parameters

ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.

Overrides ServiceProviderBase::alter

File

modules/tmgmt_smartling_log_settings/src/TmgmtSmartlingLogSettingsServiceProvider.php, line 17

Class

TmgmtSmartlingLogSettingsServiceProvider
Overrides the logger.factory service to enable record filtering.

Namespace

Drupal\tmgmt_smartling_log_settings

Code

public function alter(ContainerBuilder $container) {

  // Alter logger factory in order to instantiate
  // Drupal\tmgmt_smartling_log_settings\Logger\LoggerChannel.
  $container
    ->getDefinition('logger.factory')
    ->setClass(LoggerChannelFactory::class);
}