aboutsummaryrefslogtreecommitdiff
path: root/cmd/moncheck
diff options
context:
space:
mode:
authorGibheer <gibheer+git@zero-knowledge.org>2018-12-12 14:05:46 +0100
committerGibheer <gibheer+git@zero-knowledge.org>2018-12-12 14:05:46 +0100
commitaffbe8c4206437b265e322aafaa74d39f0278d57 (patch)
tree03f6d030097e53f541af0b5befb3955699b1eb74 /cmd/moncheck
parentcb5b49e4d669a484f66dd4a339a80d47fc1de04c (diff)
moncheck - log the state which wasn't found
Diffstat (limited to 'cmd/moncheck')
-rw-r--r--cmd/moncheck/main.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/moncheck/main.go b/cmd/moncheck/main.go
index e292637..2c3ca27 100644
--- a/cmd/moncheck/main.go
+++ b/cmd/moncheck/main.go
@@ -147,15 +147,16 @@ func check(thread int, db *sql.DB, waitDuration, timeout time.Duration) {
state = 0
}
+ mappedState := state
err = db.QueryRow(`select target
from mapping_level
- where mapping_id = $1 and source = $2`, mapId, state).Scan(&state)
+ where mapping_id = $1 and source = $2`, mapId, state).Scan(&mappedState)
if err != nil {
- log.Printf("[%d] could not fetch error mapping for check '%d': %s", thread, id, err)
+ log.Printf("[%d] could not fetch error mapping for check '%d' and source code '%d': %s", thread, id, state, err)
tx.Rollback()
continue
}
- states.Add(state)
+ states.Add(mappedState)
msg := output.String()
if _, err := tx.Exec(`update active_checks ac