nodece commented on code in PR #25536:
URL: https://github.com/apache/pulsar/pull/25536#discussion_r3091423133
##########
pulsar-broker/src/test/java/org/apache/pulsar/client/api/DeadLetterTopicTest.java:
##########
@@ -1524,20 +1532,21 @@ public void
testDeadLetterTopicWithMaxUnackedMessagesBlocking() throws Exception
Message<byte[]> message = deadLetterConsumer.receive();
if (message != null) {
String messageContent = new String(message.getData());
- log.info("Dead letter message received: {}",
messageContent);
+ log.info().attr("messageReceived",
messageContent).log("Dead letter message received");
deadLetterConsumer.acknowledge(message);
totalInDeadLetter++;
} else {
log.warn("No more messages in DLQ");
break;
}
} catch (Exception e) {
- log.warn("Exception while receiving from DLQ", e);
+ log.warn().exception(e).log("Exception while receiving from
DLQ");
break;
}
}
- log.info("Total messages in dead letter queue: {}, Expected: {}",
totalInDeadLetter, sendMessages);
+ log.info().attr("letterQueue", totalInDeadLetter).attr("expected",
sendMessages)
+ .log("Total messages in dead letter queue, Expected");
Review Comment:
```suggestion
.log("Total messages in dead letter queue");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]