You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/08/29 09:22:08 UTC

[GitHub] [rocketmq] lizhanhui commented on a diff in pull request #4922: [ISSUE #4921] Fix wrong log output in TimerMessageStore

lizhanhui commented on code in PR #4922:
URL: https://github.com/apache/rocketmq/pull/4922#discussion_r957083304


##########
store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:
##########
@@ -240,12 +240,11 @@ private void calcTimerDistribution() {
                 Slot slotEach = timerWheel.getSlot(currTime + j * precisionMs);
                 periodTotal += slotEach.num;
             }
-            LOGGER.info("%d period's total num: %d\n", timerDist.get(i), periodTotal);
+            LOGGER.info("{} period's total num: {}", timerDist.get(i), periodTotal);

Review Comment:
   IMO, debug should be used here.



##########
store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:
##########
@@ -240,12 +240,11 @@ private void calcTimerDistribution() {
                 Slot slotEach = timerWheel.getSlot(currTime + j * precisionMs);
                 periodTotal += slotEach.num;
             }
-            LOGGER.info("%d period's total num: %d\n", timerDist.get(i), periodTotal);
+            LOGGER.info("{} period's total num: {}", timerDist.get(i), periodTotal);
             this.timerMetrics.updateDistPair(timerDist.get(i), periodTotal);
         }
         long endTime = System.currentTimeMillis();
-        LOGGER.info("Total cost Time:%d%n", endTime - startTime);
-
+        LOGGER.info("Total cost Time: {}", endTime - startTime);

Review Comment:
   Same here.



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org