Skip to content

Commit 902d2d6

Browse files
authored
Merge pull request #499 from ClickHouse/cleanup-chatty-logs
Tweak log statement to reduce empty output
2 parents cd1a080 + 9039ae2 commit 902d2d6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/clickhouse/kafka/connect/sink/ClickHouseSinkTask.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ public void put(Collection<SinkRecord> records) {
4747
long putStat = System.currentTimeMillis();
4848
this.proxySinkTask.put(records);
4949
long putEnd = System.currentTimeMillis();
50-
LOGGER.info("Put records: {} in {} ms", records.size(), putEnd - putStat);
50+
if (!records.isEmpty()) {
51+
LOGGER.info("Put records: {} in {} ms", records.size(), putEnd - putStat);
52+
}
5153
} catch (Exception e) {
5254
LOGGER.trace("Passing the exception to the exception handler.");
5355
boolean errorTolerance = clickHouseSinkConfig != null && clickHouseSinkConfig.isErrorsTolerance();

0 commit comments

Comments
 (0)