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/09/22 02:27:15 UTC
[GitHub] [rocketmq] caigy commented on a diff in pull request #5153: [ISSUE #5152] Change the error log level to error
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org