From 6b95390b46701c8ee3f0d9d25e015ef5eb9deae1 Mon Sep 17 00:00:00 2001 From: urso Date: Thu, 28 Apr 2016 15:28:47 +0200 Subject: [PATCH] Fix kafka log message printing --- CHANGELOG.asciidoc | 1 + libbeat/outputs/kafka/log.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index dc379b95061..479b2e3720e 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -49,6 +49,7 @@ https://github.com/elastic/beats/compare/v5.0.0-alpha1...master[Check the HEAD d - Fix race when multiple outputs access the same event with logstash output manipulating event {issue}1410[1410] {pull}1428[1428] - Seed random number generator using crypto.rand package. {pull}1503{1503] - Fix beats hanging in -configtest {issue}1213[1213] +- Fix kafka log message output {pull}1516[1516] *Packetbeat* diff --git a/libbeat/outputs/kafka/log.go b/libbeat/outputs/kafka/log.go index ef257a159a7..7613032bd5e 100644 --- a/libbeat/outputs/kafka/log.go +++ b/libbeat/outputs/kafka/log.go @@ -5,13 +5,13 @@ import "github.com/elastic/beats/libbeat/logp" type kafkaLogger struct{} func (kafkaLogger) Print(v ...interface{}) { - logp.Warn("kafka message: %v", v) + logp.Warn("kafka message: %v", v...) } func (kafkaLogger) Printf(format string, v ...interface{}) { - logp.Warn(format, v) + logp.Warn(format, v...) } func (kafkaLogger) Println(v ...interface{}) { - logp.Warn("kafka message: %v", v) + logp.Warn("kafka message: %v", v...) }