summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Sibiryakov <sibiryakov@users.noreply.github.com>2018-11-10 21:46:54 +0100
committerDana Powers <dana.powers@gmail.com>2018-11-10 12:46:54 -0800
commitcd47701ba63fc77309066e27b73f50d0150e3e1b (patch)
tree3bfe601e240a340983edecd1a74707c3027501ba
parent1c0e8942dc75837a2e43b93e0ed6700fb7752a03 (diff)
downloadkafka-python-cd47701ba63fc77309066e27b73f50d0150e3e1b.tar.gz
raising logging level on messages signalling data loss (#1553)
-rw-r--r--kafka/producer/record_accumulator.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/kafka/producer/record_accumulator.py b/kafka/producer/record_accumulator.py
index 84b01d1..728bf18 100644
--- a/kafka/producer/record_accumulator.py
+++ b/kafka/producer/record_accumulator.py
@@ -70,7 +70,8 @@ class ProducerBatch(object):
return future
def done(self, base_offset=None, timestamp_ms=None, exception=None):
- log.debug("Produced messages to topic-partition %s with base offset"
+ level = logging.DEBUG if exception is None else logging.WARNING
+ log.log(level, "Produced messages to topic-partition %s with base offset"
" %s and error %s.", self.topic_partition, base_offset,
exception) # trace
if self.produce_future.is_done:
@@ -329,7 +330,7 @@ class RecordAccumulator(object):
to_remove = []
if expired_batches:
- log.debug("Expired %d batches in accumulator", count) # trace
+ log.warning("Expired %d batches in accumulator", count) # trace
return expired_batches