diff options
-rw-r--r-- | kafka/producer/record_accumulator.py | 5 |
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 |