diff options
| author | Gibheer <gibheer+git@zero-knowledge.org> | 2018-12-12 14:05:46 +0100 | 
|---|---|---|
| committer | Gibheer <gibheer+git@zero-knowledge.org> | 2018-12-12 14:05:46 +0100 | 
| commit | affbe8c4206437b265e322aafaa74d39f0278d57 (patch) | |
| tree | 03f6d030097e53f541af0b5befb3955699b1eb74 /cmd | |
| parent | cb5b49e4d669a484f66dd4a339a80d47fc1de04c (diff) | |
moncheck - log the state which wasn't found
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/moncheck/main.go | 7 | 
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 | 
