Oliverwqcwrw commented on code in PR #5826:
URL: https://github.com/apache/rocketmq/pull/5826#discussion_r1062198930
##########
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:
> > IMO, user can choose if to print message body,
> > so we can provide a readable format when users need to print message body
>
> +1. Maybe we can check the size of message body first and only print the
message body if the size is small.
Good idea, I have limited the length to 3000 at present,WDYT :-)
--
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]