Skip to content

Commit

Permalink
Log Kafka send errors as warn
Browse files Browse the repository at this point in the history
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
  • Loading branch information
robbavey committed Feb 11, 2019
1 parent d06346e commit 6d3dd87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/logstash/outputs/kafka.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6d3dd87

Please sign in to comment.