Skip to content

Commit e88ecec

Browse files
committed
Reverted more changes to reduce the diff
1 parent be678a1 commit e88ecec

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

kafka/producer/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def _send_messages(self, topic, partition, *msg, **kwargs):
231231
resp = self.client.send_produce_request([req], acks=self.req_acks,
232232
timeout=self.ack_timeout)
233233
except:
234-
log.exception('Unable to send messages. Topics: {0} Number of msgs: {1}'.format(topic, len(messages)))
234+
log.exception("Unable to send messages")
235235
raise
236236
return resp
237237

kafka/producer/simple.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
BATCH_SEND_MSG_COUNT
1414
)
1515

16-
log = logging.getLogger(__name__)
16+
log = logging.getLogger("kafka")
1717

1818

1919
class SimpleProducer(Producer):
@@ -57,9 +57,6 @@ def __init__(self, client, async=False,
5757
maxsize)
5858

5959
def _next_partition(self, topic):
60-
# for each message sent a partition is chosen, if random_start is True
61-
# a random partition is selected, otherwise the next partition in the cycle
62-
# is picked up
6360
if topic not in self.partition_cycles:
6461
if not self.client.has_metadata_for_topic(topic):
6562
self.client.load_metadata_for_topics(topic)

0 commit comments

Comments
 (0)