Explorar o código

add logs when adding nodes to zombie list

Matthew R. Kasun %!s(int64=3) %!d(string=hai) anos
pai
achega
faebdce277
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      logic/zombie.go

+ 2 - 0
logic/zombie.go

@@ -107,8 +107,10 @@ func InitializeZombies() {
 			if node.MacAddress == othernode.MacAddress {
 			if node.MacAddress == othernode.MacAddress {
 				if node.LastCheckIn > othernode.LastCheckIn {
 				if node.LastCheckIn > othernode.LastCheckIn {
 					zombies = append(zombies, othernode.ID)
 					zombies = append(zombies, othernode.ID)
+					logger.Log(1, "adding ", othernode.Name, " with ID ", othernode.ID, " to zombie list")
 				} else {
 				} else {
 					zombies = append(zombies, node.ID)
 					zombies = append(zombies, node.ID)
+					logger.Log(1, "adding ", node.Name, " with ID ", node.ID, " to zombie list")
 				}
 				}
 			}
 			}
 		}
 		}