Skip to content

Commit

Permalink
Log autodiscover config errors as Error instead of debug. (#8413)
Browse files Browse the repository at this point in the history
If an invalid config is being generated, the user probably wants to know about it.

I personally found this to be quite confusing myself. Debug logging is usually for finding
either bugs in the code or extreme detail. I would say ensuring a config is valid is part
of the standard set of operations.
  • Loading branch information
andrewvc authored Sep 25, 2018
1 parent 058916c commit 99c4db2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libbeat/autodiscover/autodiscover.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package autodiscover

import (
"fmt"
"time"

"github.com/pkg/errors"
Expand Down Expand Up @@ -171,7 +172,7 @@ func (a *Autodiscover) handleStart(event bus.Event) bool {

err = a.adapter.CheckConfig(config)
if err != nil {
logp.Debug(debugK, "Check failed for config %v: %v, won't start runner", config, err)
logp.Error(errors.Wrap(err, fmt.Sprintf("Auto discover config check failed for config %v, won't start runner", config)))
continue
}

Expand Down

0 comments on commit 99c4db2

Please sign in to comment.