From 3eb5461fe44eee48c84bd2cd5bf183ac19038b35 Mon Sep 17 00:00:00 2001 From: Joakim Karlsson Date: Sat, 3 Feb 2018 16:30:11 +0100 Subject: [PATCH] adding output messages --- app/controllers/health_controller.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/health_controller.go b/app/controllers/health_controller.go index 6554a140..ca63cc03 100644 --- a/app/controllers/health_controller.go +++ b/app/controllers/health_controller.go @@ -22,6 +22,7 @@ type HealthController struct { } func sendHeartBeat(channel chan<- *ControllerHeartbeat, controller string) { + glog.Infof("Send Heartbeat from %s", controller) heartbeat := ControllerHeartbeat{ Component: controller, Lastheartbeat: time.Now(), @@ -31,7 +32,7 @@ func sendHeartBeat(channel chan<- *ControllerHeartbeat, controller string) { func (hc *HealthController) Handler(w http.ResponseWriter, req *http.Request) { w.WriteHeader(http.StatusOK) - w.Write([]byte("These aren't the droids you're looking for")) + w.Write([]byte("These aren't the droids you're looking for\n")) } func (hc *HealthController) Run(healthChan <-chan *ControllerHeartbeat, stopCh <-chan struct{}, wg *sync.WaitGroup) error { @@ -60,8 +61,9 @@ func (hc *HealthController) Run(healthChan <-chan *ControllerHeartbeat, stopCh < } return nil case heartbeat := <-healthChan: - glog.V(3).Infof("Received heartbeat from %s", heartbeat.Component) + glog.Infof("Received heartbeat from %s", heartbeat.Component) case <-t.C: + glog.Infof("Health controller tick") } }