Skip to content

Commit 1775f43

Browse files
authored
Always log broker errors in producer.send (#2478)
1 parent 776556a commit 1775f43

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

kafka/producer/kafka.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ def send(self, topic, value=None, key=None, headers=None, partition=None, timest
615615
# for API exceptions return them in the future,
616616
# for other exceptions raise directly
617617
except Errors.BrokerResponseError as e:
618-
log.debug("Exception occurred during message send: %s", e)
618+
log.error("Exception occurred during message send: %s", e)
619619
return FutureRecordMetadata(
620620
FutureProduceResult(TopicPartition(topic, partition)),
621621
-1, None, None,

kafka/producer/sender.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def add_topic(self, topic):
181181
self.wakeup()
182182

183183
def _failed_produce(self, batches, node_id, error):
184-
log.debug("Error sending produce request to node %d: %s", node_id, error) # trace
184+
log.error("Error sending produce request to node %d: %s", node_id, error) # trace
185185
for batch in batches:
186186
self._complete_batch(batch, error, -1, None)
187187

0 commit comments

Comments
 (0)