Skip to content

Commit

Permalink
logging: Joining the cluster is an info, not an error
Browse files Browse the repository at this point in the history
  • Loading branch information
olivere committed Feb 27, 2016
1 parent 217c400 commit 515f705
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Mara Kim [@autochthe](https://github.com/autochthe)
Medhi Bechina [@mdzor](https://github.com/mdzor)
Nicholas Wolff [@nwolff](https://github.com/nwolff)
Orne Brocaar [@brocaar](https://github.com/brocaar)
Ryan Schmukler [@rschmukler](https://github.com/rschmukler)
Sacheendra talluri [@sacheendra](https://github.com/sacheendra)
Sean DuBois [@Sean-Der](https://github.com/Sean-Der)
Shalin LK [@shalinlk](https://github.com/shalinlk)
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ func (c *Client) updateConns(conns []*conn) {
}
if !found {
// New connection didn't exist, so add it to our list of new conns.
c.errorf("elastic: %s joined the cluster", conn.URL())
c.infof("elastic: %s joined the cluster", conn.URL())
newConns = append(newConns, conn)
}
}
Expand Down
6 changes: 3 additions & 3 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ func TestPerformRequestWithLogger(t *testing.T) {
var w bytes.Buffer
out := log.New(&w, "LOGGER ", log.LstdFlags)

client, err := NewClient(SetInfoLog(out))
client, err := NewClient(SetInfoLog(out), SetSniff(false))
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -722,7 +722,7 @@ func TestPerformRequestWithLoggerAndTracer(t *testing.T) {
var tw bytes.Buffer
tout := log.New(&tw, "TRACER ", log.LstdFlags)

client, err := NewClient(SetInfoLog(lout), SetTraceLog(tout))
client, err := NewClient(SetInfoLog(lout), SetTraceLog(tout), SetSniff(false))
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -765,7 +765,7 @@ func (l *customLogger) Printf(format string, v ...interface{}) {
func TestPerformRequestWithCustomLogger(t *testing.T) {
logger := &customLogger{}

client, err := NewClient(SetInfoLog(logger))
client, err := NewClient(SetInfoLog(logger), SetSniff(false))
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 515f705

Please sign in to comment.