Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove error log from runnerfactory as error is returned by API #5085

Merged
merged 1 commit into from
Sep 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ https://github.com/elastic/beats/compare/v6.0.0-beta2...master[Check the HEAD di
- Add PostgreSQL module with slowlog support. {pull}4763[4763]
- Add Kafka log module. {pull}4885[4885]
- Add support for `/var/log/containers/` log path in `add_kubernetes_metadata` processor. {pull}4981[4981]
- Remove error log from runnerfactory as error is returned by API. {pull}5085[5085]

*Heartbeat*

Expand Down
2 changes: 0 additions & 2 deletions filebeat/prospector/runnerfactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"github.com/elastic/beats/filebeat/registrar"
"github.com/elastic/beats/libbeat/cfgfile"
"github.com/elastic/beats/libbeat/common"
"github.com/elastic/beats/libbeat/logp"
)

// RunnerFactory is a factory for registrars
Expand All @@ -28,7 +27,6 @@ func NewRunnerFactory(outlet channel.Factory, registrar *registrar.Registrar, be
func (r *RunnerFactory) Create(c *common.Config) (cfgfile.Runner, error) {
p, err := New(c, r.outlet, r.beatDone, r.registrar.GetStates())
if err != nil {
logp.Err("Error creating prospector: %s", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The only problem with the error logged by the runner factory is probably that it's more generic and does not talk about the prospector itself?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged it as is as I kind of like producing errors in as few places and just pass them on. We can still improve it in case it becomes an issue.

// In case of error with loading state, prospector is still returned
return p, err
}
Expand Down