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']
        ));
    }
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']
        ));
    }
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' ] ) ) ; }
Create a custom log driver instance.

@param array $config

@throws \Viserio\Component\Contract\Log\Exception\RuntimeException

@return \Psr\Log\LoggerInterface
Create a custom log driver instance .