From 4879821486ad8bd03268b43845adb6e8a369c970 Mon Sep 17 00:00:00 2001 From: Evan Hazlett Date: Sat, 30 Jun 2018 15:38:49 -0400 Subject: [PATCH] minor tweak to logging Signed-off-by: Evan Hazlett --- start.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/start.go b/start.go index 59e35ae..2f33bcb 100644 --- a/start.go +++ b/start.go @@ -9,14 +9,11 @@ import ( // Start activates the GRPC listener as well as joins the cluster if specified and blocks until a SIGTERM or SIGINT is received func (a *Agent) Start() error { - logrus.Infof("starting agent: grpc=%s:%d bind=%s:%d advertise=%s:%d", - a.config.AgentAddr, - a.config.AgentPort, - a.config.BindAddr, - a.config.BindPort, - a.config.AdvertiseAddr, - a.config.AdvertisePort, - ) + logrus.WithFields(logrus.Fields{ + "grpc": fmt.Sprintf("%s:%d", a.config.AgentAddr, a.config.AgentPort), + "bind": fmt.Sprintf("%s:%d", a.config.BindAddr, a.config.BindPort), + "advertise": fmt.Sprintf("%s:%d", a.config.AdvertiseAddr, a.config.AdvertisePort), + }).Info("starting agent") l, err := net.Listen("tcp", fmt.Sprintf("%s:%d", a.config.AgentAddr, a.config.AgentPort)) if err != nil { return err