caigy commented on code in PR #5153:
URL: https://github.com/apache/rocketmq/pull/5153#discussion_r977130353


##########
client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:
##########
@@ -1326,12 +1326,10 @@ public TransactionSendResult 
sendMessageInTransaction(final Message msg,
                     }
 
                     if (localTransactionState != 
LocalTransactionState.COMMIT_MESSAGE) {
-                        log.info("executeLocalTransactionBranch return {}", 
localTransactionState);
-                        log.info(msg.toString());
+                        log.info("executeLocalTransactionBranch return: {} 
message: {}", localTransactionState, msg);
                     }
                 } catch (Throwable e) {
-                    log.info("executeLocalTransactionBranch exception", e);
-                    log.info(msg.toString());
+                    log.error("executeLocalTransactionBranch exception, 
message: {}", msg, e);

Review Comment:
   It seems that exception stack cannot be printed correctly here,  please 
check the method  
`org.apache.rocketmq.logging.InternalLogger#error(java.lang.String, 
java.lang.Throwable)`.
   
   Also, `msg` may be very large, logging it in a separate line may be more 
clear and friendly to GC.



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