| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | 3 | public function load(array $configs, ContainerBuilder $container): void |
|
| 21 | { |
||
| 22 | 3 | $configuration = new Configuration(); |
|
| 23 | 3 | $config = $this->processConfiguration($configuration, $configs); |
|
| 24 | |||
| 25 | 3 | $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 26 | 3 | $loader->load('services.xml'); |
|
| 27 | 3 | $loader->load('processors.xml'); |
|
| 28 | |||
| 29 | 3 | $definition = $container->getDefinition('deamon.logger_extra.context'); |
|
| 30 | 3 | $definition->addArgument($config['application']['name']); |
|
| 31 | 3 | $definition->addArgument($config['application']['locale']); |
|
| 32 | |||
| 33 | 3 | $definition = $container->getDefinition('deamon.logger_extra.processors.web_processor'); |
|
| 34 | 3 | $definition->addArgument($config['config']); |
|
| 35 | |||
| 36 | 3 | $definition->clearTag('monolog.processor'); |
|
| 37 | 3 | foreach ($config['handlers'] as $handler) { |
|
| 38 | 3 | $definition->addTag('monolog.processor', ['handler' => $handler]); |
|
| 39 | } |
||
| 42 |