getParameterNameLogLevel example



    public function process(ContainerBuilder $container): void
    {
        foreach ($this->plugins as $plugin) {
            $this->processPlugin($container$plugin->getContainerPrefix());
        }
    }

    protected function processPlugin(ContainerBuilder $container, string $servicePrefix): void
    {
        if (!$container->hasParameter($logLevel = $this->getParameterNameLogLevel($servicePrefix))) {
            $container->setParameter($logLevel$container->getParameter('shopware.logger.level'));
        }

        if (!$container->hasParameter($logMaxFiles = $this->getParameterNameLoggerMaxFiles($servicePrefix))) {
            $container->setParameter($logMaxFiles, 14);
        }

        $container->setDefinition($this->getServiceIdLoggerHandler($servicePrefix)$this->createLoggerHandler($servicePrefix));
        $container->setDefinition($this->getServiceIdLoggerFormatter($servicePrefix)$this->createLoggerFormatter());
        $container->setDefinition($this->getServiceIdLogger($servicePrefix)$this->createLogger($servicePrefix));
    }

    
Home | Imprint | This part of the site doesn't use cookies.