From 6d3dd874b2e5b20f15b91d55b0e4564cb88654eb Mon Sep 17 00:00:00 2001 From: Rob Bavey Date: Wed, 7 Feb 2018 10:33:13 -0500 Subject: [PATCH] Log Kafka send errors as warn Log errors encountered when sending messages to Kafka at warn, rather than debug, to improve the visibility of errors such as 'RecordTooLargeException.' Fixes #177 Fixes #179 --- lib/logstash/outputs/kafka.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logstash/outputs/kafka.rb b/lib/logstash/outputs/kafka.rb index 6aa5ef9..02dd9a8 100644 --- a/lib/logstash/outputs/kafka.rb +++ b/lib/logstash/outputs/kafka.rb @@ -275,7 +275,7 @@ def retrying_send(batch) result = future.get() rescue => e # TODO(sissel): Add metric to count failures, possibly by exception type. - logger.debug? && logger.debug("KafkaProducer.send() failed: #{e}", :exception => e); + logger.warn("KafkaProducer.send() failed: #{e}", :exception => e) failures << batch[i] end end