protected function createCustomDriver(array $config): LoggerInterface
    {
        $via            = $config['via'];
        $config['name'] = $config['original_name'];

        unset($config['original_name']);

        if (\is_callable($via)) {
            return $via($config);
        }

        if ($this->container !== null && $this->container->has($via)) {
            return $this->container->get($via);
        }

        throw new RuntimeException(\sprintf(
            'Given custom logger [%s] could not be resolved.',
            $config['name']
        ));
    }