nodece commented on code in PR #25536:
URL: https://github.com/apache/pulsar/pull/25536#discussion_r3091367445


##########
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/PatternTopicsConsumerImplTest.java:
##########
@@ -830,8 +829,10 @@ private void waitTopicListWatcherCreation(Consumer<?> 
consumer) {
         Awaitility.await().untilAsserted(() -> {
             CompletableFuture<TopicListWatcher> completableFuture =
                     ((PatternMultiTopicsConsumerImpl) 
consumer).getWatcherFuture();
-            log.info("isDone: {}, isCompletedExceptionally: {}", 
completableFuture.isDone(),
-                    completableFuture.isCompletedExceptionally());
+            log.info()
+                    .attr("isDone", completableFuture.isDone())
+                    .attr("isCompletedExceptionally", 
completableFuture.isCompletedExceptionally())
+                    .log("isDone: , isCompletedExceptionally");

Review Comment:
   **Malformed message — looks like an unconverted SLF4J template fragment with 
a stray colon and comma.**
   
   ```suggestion
                       .log("Future completed successfully");
   ```



##########
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageChunkingTest.java:
##########
@@ -627,7 +630,7 @@ public void testChunkSize() throws Exception {
                 .create();
         for (int size = 1; size <= maxMessageSize; size++) {
             final MessageId messageId = 
producer.send(createMessagePayload(size));
-            log.info("Send {} bytes to {}", size, messageId);
+            log.info().attr("size", size).attr("messageId", 
messageId).log("Sent bytes");

Review Comment:
   **`"Sent bytes"` lost the destination context from the original `"Send {} 
bytes to {}"` message.**
   
   Since `messageId` is already an attr, a clearer message would be:
   ```suggestion
               log.info().attr("size", size).attr("messageId", 
messageId).log("Sent bytes to messageId");
   ```



-- 
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]

Reply via email to