original_string: 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']));
      }
code: 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']));
      }
code_tokens: 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' ] ) ) ; }
docstring: Resolve the given log instance by name.
  
  @param string $name
  
  @return \Psr\Log\LoggerInterface
  
  @throws \InvalidArgumentException
docstring_tokens: Resolve the given log instance by name .