Changing naming and debug message schemes

This commit is contained in:
Diptanu Choudhury 2015-12-10 16:47:43 -08:00
parent 87233649b9
commit 4395438400
2 changed files with 2 additions and 2 deletions

View file

@ -260,7 +260,7 @@ func (c *ConsulService) registerService(service *structs.Service, task *structs.
var mErr multierror.Error
host, port := task.FindHostAndPortFor(service.PortLabel)
if host == "" || port == 0 {
return fmt.Errorf("consul: the port:%s marked for registration of service: %s couldn't be found", service.PortLabel, service.Name)
return fmt.Errorf("consul: the port:%q marked for registration of service: %q couldn't be found", service.PortLabel, service.Name)
}
c.serviceStates[service.Id] = service.Hash()

View file

@ -1169,7 +1169,7 @@ func (s *Service) InitFields(job string, taskGroup string, task string) {
for _, check := range s.Checks {
check.Id = check.Hash(s.Id)
if check.Name == "" {
check.Name = fmt.Sprintf("service: %s check", s.Name)
check.Name = fmt.Sprintf("service: %q check", s.Name)
}
}
}