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:
parent
94cdc7117c
commit
da5eef75d2
1 changed files with 3 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue