-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Report faulting file when config reload fails #11304
Report faulting file when config reload fails #11304
Conversation
libbeat/cfgfile/reload.go
Outdated
@@ -35,6 +35,7 @@ import ( | |||
) | |||
|
|||
var ( | |||
// DefaultDynamicConfig provides default behavior for a Runner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cleaning up the godoc, can you add a dot after "Runner"?
libbeat/cfgfile/reload.go
Outdated
@@ -220,7 +225,7 @@ func (rl *Reloader) loadConfigs(files []string) ([]*reload.ConfigWithMeta, error | |||
configs, err := LoadList(file) | |||
if err != nil { | |||
errs = append(errs, err) | |||
logp.Err("Error loading config: %s", err) | |||
logp.Err("Error loading config from '%s': %v", file, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably make a clear separation between the file and the error.
Error loading config from file '%s', error %v"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR LGTM, but could you rebase on master to get CI green and push again?
Modifying error output when reload config fails from
to
Fixes #8122