Skip to content

Commit

Permalink
Log connect error only in wavefront output (influxdata#3549)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson authored Dec 6, 2017
1 parent d8966d5 commit 177e7e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugins/outputs/wavefront/wavefront.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,13 @@ func (w *Wavefront) Connect() error {
uri := fmt.Sprintf("%s:%d", w.Host, w.Port)
_, err := net.ResolveTCPAddr("tcp", uri)
if err != nil {
return fmt.Errorf("Wavefront: TCP address cannot be resolved %s", err.Error())
log.Printf("Wavefront: TCP address cannot be resolved %s", err.Error())
return nil
}
connection, err := net.Dial("tcp", uri)
if err != nil {
return fmt.Errorf("Wavefront: TCP connect fail %s", err.Error())
log.Printf("Wavefront: TCP connect fail %s", err.Error())
return nil
}
defer connection.Close()
return nil
Expand Down

0 comments on commit 177e7e2

Please sign in to comment.