mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-07-03 11:53:43 +02:00
server.go: only log message if we have something interesting to show.
This commit is contained in:
parent
da5eef75d2
commit
c33b355a78
1 changed files with 6 additions and 2 deletions
|
|
@ -151,8 +151,12 @@ func main() {
|
|||
status, msg = check_api(host, port, float64(block_time))
|
||||
}
|
||||
|
||||
fmt.Printf("[Status %s] %s:%d (%d blocks): %s, %s\n",
|
||||
version, host, port, block_time / 2, status, msg)
|
||||
fmt.Printf("[Status %s] %s:%d (%d blocks): %s\n",
|
||||
version, host, port, block_time / 2, status)
|
||||
|
||||
if status != haproxy.HealthCheckUp && len(msg) > 0 {
|
||||
fmt.Println(msg)
|
||||
}
|
||||
|
||||
// Report status to HAproxy
|
||||
c.Send(fmt.Sprintln(status))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue