code: func NewServiceWithLogger(serviceName string, client *api.Client,
  	logger *log.Logger) (*Service, error) {
  	s := &Service{
  		service:              serviceName,
  		client:               client,
  		logger:               logger,
  		tlsCfg:               newDynamicTLSConfig(defaultTLSConfig(), logger),
  		httpResolverFromAddr: ConsulResolverFromAddrFunc(client),
  	}
  
  	// Set up root and leaf watches
  	p, err := watch.Parse(map[string]interface{}{
  		"type": "connect_roots",
  	})
  	if err != nil {
  		return nil, err
  	}
  	s.rootsWatch = p
  	s.rootsWatch.HybridHandler = s.rootsWatchHandler
  
  	p, err = watch.Parse(map[string]interface{}{
  		"type":    "connect_leaf",
  		"service": s.service,
  	})
  	if err != nil {
  		return nil, err
  	}
  	s.leafWatch = p
  	s.leafWatch.HybridHandler = s.leafWatchHandler
  
  	go s.rootsWatch.RunWithClientAndLogger(client, s.logger)
  	go s.leafWatch.RunWithClientAndLogger(client, s.logger)
  
  	return s, nil
  }
docs: // NewServiceWithLogger starts the service with a specified log.Logger.