From 64e99b360f15a7aea1488713753d26b4c0a567bd Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Mon, 28 Apr 2014 12:49:23 -0700 Subject: [PATCH] make cool-off error message less obscure --- tail.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tail.go b/tail.go index fe19e27..ee890a7 100644 --- a/tail.go +++ b/tail.go @@ -219,13 +219,13 @@ func (tail *Tail) tailFileSync() { if line != nil { cooloff := !tail.sendLine(line) if cooloff { - msg := "Too much activity; entering a cool-off period" - tail.Lines <- &Line{ - msg, - time.Now(), - fmt.Errorf(msg)} // Wait a second before seeking till the end of // file when rate limit is reached. + msg := fmt.Sprintf( + "Too much log activity (more than %d lines "+ + "per second being written); waiting a second "+ + "before resuming tailing", tail.LimitRate) + tail.Lines <- &Line{msg, time.Now(), fmt.Errorf(msg)} select { case <-time.After(time.Second): case <-tail.Dying():