Browse Source

v1.1.1: better error logging

master v1.1.1
AJ ONeal 5 years ago
parent
commit
52c007690d
  1. 10
      watchdog.go

10
watchdog.go

@ -52,6 +52,15 @@ func (d *Dog) watch() {
return
}
time.Sleep(time.Duration(2) * time.Second)
err2 := d.check()
if nil != err2 {
d.Logger <- fmt.Sprintf("Down: '%s': %s", d.Name, err2)
} else {
d.Logger <- fmt.Sprintf("Hiccup: '%s': %s", d.Name, err)
return
}
failure := false
t := 10
for {
@ -61,6 +70,7 @@ func (d *Dog) watch() {
t *= 2
err := d.check()
if nil != err {
d.Logger <- fmt.Sprintf("Unrecoverable: '%s': %s", d.Name, err)
failure = true
} else {
failure = false

Loading…
Cancel
Save