Add warning message when health check fails 95/11695/1
authorOndrej Fabry <ofabry@cisco.com>
Wed, 11 Apr 2018 23:32:44 +0000 (01:32 +0200)
committerOndrej Fabry <ofabry@cisco.com>
Wed, 11 Apr 2018 23:32:44 +0000 (01:32 +0200)
Change-Id: I89d465ec9395eeb298a6ca209a8a0fff9107674e
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
core/core.go

index ebe7f68..6714f6f 100644 (file)
@@ -302,13 +302,14 @@ func (c *Connection) healthCheckLoop(connChan chan ConnectionEvent) {
 
                if err != nil {
                        failedChecks++
+                       log.Warnf("VPP health check failed (%d. time): %v", failedChecks, err)
                } else {
                        failedChecks = 0
                }
 
                if failedChecks > healthCheckThreshold {
                        // in case of error, break & disconnect
-                       log.Errorf("VPP health check failed: %v", err)
+                       log.Errorf("Number of VPP health check fails exceeded treshold (%d)", healthCheckThreshold, err)
                        // signal disconnected event via channel
                        connChan <- ConnectionEvent{Timestamp: time.Now(), State: Disconnected}
                        break