From 321b0779d562400cc31c0ebd7fdb2f202c405fa5 Mon Sep 17 00:00:00 2001 From: Chelsea Holland Komlo Date: Mon, 7 May 2018 16:02:51 -0400 Subject: [PATCH] only write error log line on error --- command/agent/retry_join.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/command/agent/retry_join.go b/command/agent/retry_join.go index 328c91cc215..1a0aea8581d 100644 --- a/command/agent/retry_join.go +++ b/command/agent/retry_join.go @@ -86,8 +86,10 @@ func (r *retryJoiner) RetryJoin(config *Config) { return } - r.logger.Printf("[WARN] agent: Join failed: %v, retrying in %v", err, - config.Server.RetryInterval) + if err != nil { + r.logger.Printf("[WARN] agent: Join failed: %v, retrying in %v", err, + config.Server.RetryInterval) + } time.Sleep(config.Server.retryInterval) } }