diff --git a/command/agent/consul/sync.go b/command/agent/consul/syncer.go similarity index 97% rename from command/agent/consul/sync.go rename to command/agent/consul/syncer.go index 6c528ae31..ed556a31f 100644 --- a/command/agent/consul/sync.go +++ b/command/agent/consul/syncer.go @@ -427,7 +427,7 @@ func (c *Syncer) Run() { c.Shutdown() case <-c.notifyShutdownCh: sync.Stop() - c.logger.Printf("[INFO] consul.sync: shutting down sync for %q", c.serviceRegPrefix) + c.logger.Printf("[INFO] consul.syncer: shutting down sync for %q", c.serviceRegPrefix) return } } @@ -503,7 +503,7 @@ func (c *Syncer) consulPresent() bool { func (c *Syncer) runCheck(check Check) { res := check.Run() if res.Duration >= check.Timeout() { - c.logger.Printf("[DEBUG] consul.sync: check took time: %v, timeout: %v", res.Duration, check.Timeout()) + c.logger.Printf("[DEBUG] consul.syncer: check took time: %v, timeout: %v", res.Duration, check.Timeout()) } state := consul.HealthCritical output := res.Output @@ -521,7 +521,7 @@ func (c *Syncer) runCheck(check Check) { } if err := c.client.Agent().UpdateTTL(check.ID(), output, state); err != nil { if c.runChecks { - c.logger.Printf("[DEBUG] consul.sync: check %q failed, disabling Consul checks until until next successful sync: %v", check.ID(), err) + c.logger.Printf("[DEBUG] consul.syncer: check %q failed, disabling Consul checks until until next successful sync: %v", check.ID(), err) c.runChecks = false } else { c.runChecks = true @@ -541,7 +541,7 @@ func (c *Syncer) AddPeriodicHandler(name string, fn types.PeriodicCallback) bool c.periodicLock.Lock() defer c.periodicLock.Unlock() if _, found := c.periodicCallbacks[name]; found { - c.logger.Printf("[ERROR] consul.sync: failed adding handler %q", name) + c.logger.Printf("[ERROR] consul.syncer: failed adding handler %q", name) return false } c.periodicCallbacks[name] = fn diff --git a/command/agent/consul/sync_test.go b/command/agent/consul/syncer_test.go similarity index 100% rename from command/agent/consul/sync_test.go rename to command/agent/consul/syncer_test.go