Skip to content

Commit

Permalink
Fix panic in log harvester error handling
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 elastic#6800
  • Loading branch information
adriansr committed Apr 9, 2018
1 parent 1448c63 commit 3f830ed
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 3f830ed

Please sign in to comment.