Skip to content

Commit

Permalink
Add more info to message logged when a duplicated symlink file is fou…
Browse files Browse the repository at this point in the history
…nd (#10845)

There was a typo in the message that was logged when symlinks are enabled and the same files are found. I also added more context to the message, so it is more informative.
The new message is the following:

Same file found as symlink and original. Skipping file: test.log (as it is same as: test-2016.log)
  • Loading branch information
kvch authored Feb 21, 2019
1 parent 6e56b99 commit 06b53f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Added support for ingesting structured Elasticsearch server logs {pull}10428[10428]
- Populate more ECS fields in the Suricata module. {pull}10006[10006]
- Add ISO8601 timestamp support in syslog metricset. {issue}8716[8716] {pull}10736[10736]
- Add more info to message logged when a duplicated symlink file is found {pull}10845[10845]

*Heartbeat*

Expand Down
2 changes: 1 addition & 1 deletion filebeat/input/log/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func (p *Input) getFiles() map[string]os.FileInfo {
if p.config.Symlinks {
for _, finfo := range paths {
if os.SameFile(finfo, fileInfo) {
logp.Info("Same file found as symlink and originap. Skipping file: %s", file)
logp.Info("Same file found as symlink and original. Skipping file: %s (as it same as %s)", file, finfo.Name())
continue OUTER
}
}
Expand Down

0 comments on commit 06b53f7

Please sign in to comment.