@@ -1228,7 +1228,6 @@ public boolean isLongLived() {
1228
1228
1229
1229
@ Override // NOSONAR complexity
1230
1230
public void run () {
1231
- ListenerUtils .setLogOnlyMetadata (this .containerProperties .isOnlyLogRecordMetadata ());
1232
1231
publishConsumerStartingEvent ();
1233
1232
this .consumerThread = Thread .currentThread ();
1234
1233
setupSeeks ();
@@ -1809,7 +1808,7 @@ record = this.acks.poll();
1809
1808
}
1810
1809
1811
1810
private void traceAck (ConsumerRecord <K , V > record ) {
1812
- this .logger .trace (() -> "Ack: " + ListenerUtils . recordToString (record , true ));
1811
+ this .logger .trace (() -> "Ack: " + KafkaUtils . format (record ));
1813
1812
}
1814
1813
1815
1814
private void doAck (ConsumerRecord <K , V > record ) {
@@ -1905,14 +1904,14 @@ private synchronized void ackInOrder(ConsumerRecord<K, V> record) {
1905
1904
}
1906
1905
else if (record .offset () < offs .get (0 )) {
1907
1906
throw new IllegalStateException ("First remaining offset for this batch is " + offs .get (0 )
1908
- + "; you are acknowledging a stale record: " + ListenerUtils . recordToString (record ));
1907
+ + "; you are acknowledging a stale record: " + KafkaUtils . format (record ));
1909
1908
}
1910
1909
else {
1911
1910
deferred .add (record );
1912
1911
}
1913
1912
}
1914
1913
else {
1915
- throw new IllegalStateException ("Unexpected ack for " + ListenerUtils . recordToString (record )
1914
+ throw new IllegalStateException ("Unexpected ack for " + KafkaUtils . format (record )
1916
1915
+ "; offsets list is empty" );
1917
1916
}
1918
1917
}
@@ -2311,7 +2310,7 @@ private void invokeRecordListenerInTx(final ConsumerRecords<K, V> records) {
2311
2310
if (record == null ) {
2312
2311
continue ;
2313
2312
}
2314
- this .logger .trace (() -> "Processing " + ListenerUtils . recordToString (record ));
2313
+ this .logger .trace (() -> "Processing " + KafkaUtils . format (record ));
2315
2314
try {
2316
2315
invokeInTransaction (iterator , record );
2317
2316
}
@@ -2412,7 +2411,7 @@ private void doInvokeWithRecords(final ConsumerRecords<K, V> records) {
2412
2411
if (record == null ) {
2413
2412
continue ;
2414
2413
}
2415
- this .logger .trace (() -> "Processing " + ListenerUtils . recordToString (record ));
2414
+ this .logger .trace (() -> "Processing " + KafkaUtils . format (record ));
2416
2415
doInvokeRecordListener (record , iterator );
2417
2416
if (this .commonRecordInterceptor != null ) {
2418
2417
this .commonRecordInterceptor .afterRecord (record , this .consumer );
@@ -2445,7 +2444,7 @@ private ConsumerRecord<K, V> checkEarlyIntercept(ConsumerRecord<K, V> recordArg)
2445
2444
record = this .earlyRecordInterceptor .intercept (record , this .consumer );
2446
2445
if (record == null ) {
2447
2446
this .logger .debug (() -> "RecordInterceptor returned null, skipping: "
2448
- + ListenerUtils . recordToString (recordArg ));
2447
+ + KafkaUtils . format (recordArg ));
2449
2448
}
2450
2449
}
2451
2450
return record ;
@@ -2604,7 +2603,7 @@ record = this.recordInterceptor.intercept(record, this.consumer);
2604
2603
}
2605
2604
if (record == null ) {
2606
2605
this .logger .debug (() -> "RecordInterceptor returned null, skipping: "
2607
- + ListenerUtils . recordToString (recordArg ));
2606
+ + KafkaUtils . format (recordArg ));
2608
2607
}
2609
2608
else {
2610
2609
try {
@@ -3158,7 +3157,7 @@ public void nack(long sleep) {
3158
3157
3159
3158
@ Override
3160
3159
public String toString () {
3161
- return "Acknowledgment for " + ListenerUtils . recordToString (this .record , true );
3160
+ return "Acknowledgment for " + KafkaUtils . format (this .record );
3162
3161
}
3163
3162
3164
3163
}
0 commit comments