Added a log line to indicate we are registering a service with Consul

This commit is contained in:
Diptanu Choudhury 2015-11-18 10:32:31 -08:00
parent 21bb78f948
commit 2deed3a2eb
1 changed files with 1 additions and 0 deletions

View File

@ -51,6 +51,7 @@ func NewConsulClient(logger *log.Logger, consulAddr string) (*ConsulClient, erro
func (c *ConsulClient) Register(task *structs.Task, allocID string) error { func (c *ConsulClient) Register(task *structs.Task, allocID string) error {
var mErr multierror.Error var mErr multierror.Error
for _, service := range task.Services { for _, service := range task.Services {
c.logger.Printf("[INFO] Registering service %s with Consul.", service.Name)
if err := c.registerService(service, task, allocID); err != nil { if err := c.registerService(service, task, allocID); err != nil {
mErr.Errors = append(mErr.Errors, err) mErr.Errors = append(mErr.Errors, err)
} }