Skip to content

Commit

Permalink
raising logging level on messages signalling data loss (dpkp#1553)
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiryakov authored and dpkp committed Nov 10, 2018
1 parent 1c0e894 commit cd47701
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kafka/producer/record_accumulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def try_append(self, timestamp_ms, key, value, headers):
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:
Expand Down Expand Up @@ -329,7 +330,7 @@ def abort_expired_batches(self, request_timeout_ms, cluster):
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

Expand Down

0 comments on commit cd47701

Please sign in to comment.