From 2261a469e3c78fdde72daea72047da19f0676c33 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Wed, 2 Jun 2021 17:17:43 -0400 Subject: [PATCH] cmd: move agent running message to logs Previously this line was mixed up with logging, which made the output quite ugly. Use the logger to output this message, instead of printing directly to stdout. This has the advantage that the message will be visible when json logs are enabled. --- command/agent/agent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/agent/agent.go b/command/agent/agent.go index cbf3d78583..ef65a025e7 100644 --- a/command/agent/agent.go +++ b/command/agent/agent.go @@ -270,7 +270,7 @@ func (c *cmd) run(args []string) int { // Let the agent know we've finished registration agent.StartSync() - cli.output("Consul agent running!") + c.logger.Info("Consul agent running!") // wait for signal signalCh = make(chan os.Signal, 10)