You are here

class TmgmtSmartlingLogSettingsServiceProvider 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

Overrides the logger.factory service to enable record filtering.

Hierarchy

Expanded class hierarchy of TmgmtSmartlingLogSettingsServiceProvider

File

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

Namespace

Drupal\tmgmt_smartling_log_settings
View source
class TmgmtSmartlingLogSettingsServiceProvider extends ServiceProviderBase {

  /**
   * {@inheritdoc}
   */
  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);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ServiceProviderBase::register public function Registers services to the container. Overrides ServiceProviderInterface::register 1
TmgmtSmartlingLogSettingsServiceProvider::alter public function Modifies existing service definitions. Overrides ServiceProviderBase::alter