Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
Added absOffset for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshartig committed May 6, 2016
1 parent dccd235 commit 2054f15
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions transaction/incoming.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,9 @@ func handleIncomingReport(t *tx, rep *lproto.Report) (*lproto.TxMsg_Report, *lpr
} else {
fin.Offset = offset
kv["offset"] = offset
llog.Info("slave offset", kv)
if config.Threshold < math.Abs(offset) {
absOff := math.Abs(offset)
llog.Info("slave offset", kv, llog.KV{"absOffset": absOff})
if config.Threshold < absOff {
llog.Warn("slave offset is over threshold", kv)
}
}
Expand Down

0 comments on commit 2054f15

Please sign in to comment.