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.
This commit is contained in:
Daniel Nephin 2021-06-02 17:17:43 -04:00
parent 63c737017d
commit e207a5de05

View file

@ -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)