protected function resolve($name)
    {
        $config = $this->app['config']->get(\sprintf('log.channels.%s', $name));

        if (is_null($config)) {
            throw new \InvalidArgumentException(\sprintf('Log [%s] is not defined.', $name));
        }

        if (isset($this->customCreators[$config['driver']])) {
            return $this->callCustomCreator($config);
        }

        $driverMethod = 'create'.ucfirst($config['driver']).'Driver';

        if (method_exists($this, $driverMethod)) {
            return $this->{$driverMethod}($config);
        }

        throw new \InvalidArgumentException(\sprintf('Driver [%s] is not supported.', $config['driver']));
    }
protected function resolve($name)
    {
        $config = $this->app['config']->get(\sprintf('log.channels.%s', $name));

        if (is_null($config)) {
            throw new \InvalidArgumentException(\sprintf('Log [%s] is not defined.', $name));
        }

        if (isset($this->customCreators[$config['driver']])) {
            return $this->callCustomCreator($config);
        }

        $driverMethod = 'create'.ucfirst($config['driver']).'Driver';

        if (method_exists($this, $driverMethod)) {
            return $this->{$driverMethod}($config);
        }

        throw new \InvalidArgumentException(\sprintf('Driver [%s] is not supported.', $config['driver']));
    }
protected function resolve ( $ name ) { $ config = $ this -> app [ 'config' ] -> get ( \ sprintf ( 'log.channels.%s' , $ name ) ) ; if ( is_null ( $ config ) ) { throw new \ InvalidArgumentException ( \ sprintf ( 'Log [%s] is not defined.' , $ name ) ) ; } if ( isset ( $ this -> customCreators [ $ config [ 'driver' ] ] ) ) { return $ this -> callCustomCreator ( $ config ) ; } $ driverMethod = 'create' . ucfirst ( $ config [ 'driver' ] ) . 'Driver' ; if ( method_exists ( $ this , $ driverMethod ) ) { return $ this -> { $ driverMethod } ( $ config ) ; } throw new \ InvalidArgumentException ( \ sprintf ( 'Driver [%s] is not supported.' , $ config [ 'driver' ] ) ) ; }
Resolve the given log instance by name.

@param string $name

@return \Psr\Log\LoggerInterface

@throws \InvalidArgumentException
Resolve the given log instance by name .