You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2023/01/05 04:08:41 UTC

[GitHub] [rocketmq] ShadowySpirits commented on a diff in pull request #5826: [ISSUE #5825] Enhance Message body readability

ShadowySpirits commented on code in PR #5826:
URL: https://github.com/apache/rocketmq/pull/5826#discussion_r1062093457


##########
common/src/main/java/org/apache/rocketmq/common/message/Message.java:
##########
@@ -210,7 +210,7 @@ public String toString() {
             "topic='" + topic + '\'' +
             ", flag=" + flag +
             ", properties=" + properties +
-            ", body=" + Arrays.toString(body) +
+            ", body=" + (body != null ? new String(body, StandardCharsets.UTF_8) : "") +

Review Comment:
   The message body may be very large and compressed or serialized. It's better not to print the message body in `toString` function.



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

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