1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-18 05:00:03 +02:00

server.go: change status log output + add version to it.

This commit is contained in:
Henrik Hautakoski 2020-02-07 07:33:11 +01:00
parent 94cdc7117c
commit da5eef75d2

View file

@ -147,10 +147,12 @@ func main() {
if version == "v2" {
status, msg = check_api_v2(host, port, int64(block_time / 2))
} else {
version = "v1"
status, msg = check_api(host, port, float64(block_time))
}
fmt.Printf("- %s:%d (%d blocks): %s, %s\n", host, port, block_time / 2, status, msg)
fmt.Printf("[Status %s] %s:%d (%d blocks): %s, %s\n",
version, host, port, block_time / 2, status, msg)
// Report status to HAproxy
c.Send(fmt.Sprintln(status))