private function configureExceptionListener(
        array $loggingConfig,
        array $exceptionListenerConfig,
        ContainerBuilder $container
    ): void {
        if ($this->isConfigEnabled($container, $loggingConfig)) {
            $definition = $container
                ->getDefinition('fivelab.resource.event_listener.exception_logging')
                ->replaceArgument(2, $loggingConfig['level'])
                ->setAbstract(false)
                ->addTag('monolog.logger', ['channel' => $loggingConfig['channel']]);
        } else {
            $definition = $container->getDefinition('fivelab.resource.event_listener.logging');
        }

        $container
            ->getDefinition('fivelab.resource.event_listener.exception')
            ->replaceArgument(3, $exceptionListenerConfig['debug_parameter']);

        $definition->addTag('kernel.event_listener', [
            'event' => KernelEvents::EXCEPTION,
            'method' => 'onKernelException',
        ]);
    }