Skip to content

Commit

Permalink
Fix for kafka logger (elastic#6430)
Browse files Browse the repository at this point in the history
* Fix for kafka logger

The arguments are passed as slice (v) instead of a argument list (v...) which results in a wrong output in the log

* Add pull request to CHANGELOG
  • Loading branch information
mrauter authored and adriansr committed May 17, 2018
1 parent 45bc0c1 commit eccb522
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,21 @@ https://github.com/elastic/beats/compare/v6.0.1...v6.1.0[View commits]
- Fix logstash output debug message. {pull}5799{5799]
- Fix isolation of modules when merging local and global field settings. {issue}5795[5795]
- Report ephemeral ID and uptime in monitoring events on all platforms {pull}6501[6501]
- Fix panic when Events containing a float32 value are normalized. {pull}6129[6129]
- Fix `setup.dashboards.always_kibana` when using Kibana 5.6. {issue}6090[6090]
- Update Golang 1.9.4 {pull}6326[6326]
- Fix conditions checking on autodiscover Docker labels. {pull}6412[6412]
- Fix for kafka logger. {pull}6430[6430]
*Auditbeat*
- Add an error check to the file integrity scanner to prevent a panic when
there is an error reading file info via lstat. {issue}6005[6005]
- Fixed an issue where the proctitle value was being truncated.
- Fixed an issue where values were incorrectly interpretted as hex data.
- Fixed parsing of the `key` value when multiple keys are present.
- Fix possible resource leak if file_integrity module is used with config
reloading on Windows or Linux. {pull}6198[6198]
*Filebeat*
Expand Down
8 changes: 4 additions & 4 deletions libbeat/outputs/kafka/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
type kafkaLogger struct{}

func (kl kafkaLogger) Print(v ...interface{}) {
kl.Log("kafka message: %v", v)
kl.Log("kafka message: %v", v...)
}

func (kl kafkaLogger) Printf(format string, v ...interface{}) {
kl.Log(format, v)
kl.Log(format, v...)
}

func (kl kafkaLogger) Println(v ...interface{}) {
Expand All @@ -31,8 +31,8 @@ func (kafkaLogger) Log(format string, v ...interface{}) {
}
}
if warn {
logp.Warn(format, v)
logp.Warn(format, v...)
} else {
logp.Info(format, v)
logp.Info(format, v...)
}
}

0 comments on commit eccb522

Please sign in to comment.