Fixed the bug...

This commit is contained in:
Henry Hu 2016-02-05 21:13:53 +08:00
parent 803f08625a
commit 4d7f5eacf0
1 changed files with 0 additions and 9 deletions

View File

@ -3,7 +3,6 @@ package tail
import ( import (
"fmt" "fmt"
"log" "log"
"math"
"os" "os"
"strings" "strings"
"sync" "sync"
@ -11,7 +10,6 @@ import (
"github.com/hpcloud/tail" "github.com/hpcloud/tail"
"github.com/influxdata/telegraf" "github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/internal/encoding" "github.com/influxdata/telegraf/internal/encoding"
"github.com/influxdata/telegraf/internal/encoding/graphite"
"github.com/influxdata/telegraf/plugins/inputs" "github.com/influxdata/telegraf/plugins/inputs"
_ "github.com/influxdata/telegraf/internal/encoding/graphite" _ "github.com/influxdata/telegraf/internal/encoding/graphite"
@ -138,13 +136,6 @@ func (t *Tail) handleLine(line string) {
// Parse it. // Parse it.
metric, err := t.encodingParser.ParseLine(line) metric, err := t.encodingParser.ParseLine(line)
if err != nil { if err != nil {
switch err := err.(type) {
case *graphite.UnsupposedValueError:
// Graphite ignores NaN values with no error.
if math.IsNaN(err.Value) {
return
}
}
t.logger.Printf("unable to parse line: %s: %s", line, err) t.logger.Printf("unable to parse line: %s: %s", line, err)
return return
} }