Skip to content

Commit

Permalink
Fix panic in log harvester error handling (#6801)
Browse files Browse the repository at this point in the history
When the log harvester initialisation fails (i.e. due to wrong configuration),
it causes a panic instead of reporting the error.

Fixes #6800
  • Loading branch information
adriansr authored and ruflin committed Apr 9, 2018
1 parent 2278910 commit 2eb3fec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ https://github.com/elastic/beats/compare/v6.0.0-beta2...master[Check the HEAD di

*Filebeat*

- Fix panic when log prospector configuration fails to load. {issue}6800[6800]

*Heartbeat*

*Metricbeat*
Expand Down
4 changes: 3 additions & 1 deletion filebeat/input/log/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,9 @@ func (p *Input) createHarvester(state file.State, onTerminate func()) (*Harveste
},
outlet,
)
h.onTerminate = onTerminate
if err == nil {
h.onTerminate = onTerminate
}
return h, err
}

Expand Down

0 comments on commit 2eb3fec

Please sign in to comment.