Commit 08992b44 by Future

日志注释

parent 9ccba4b1
......@@ -13,7 +13,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import java.util.List;
import java.util.Objects;
/**
* @Author wenzhida
......@@ -206,21 +205,21 @@ public class RocketMqProducerService implements SendCallback {
* 打印消息topic等参数方便后续查找问题
*/
private void logMsg(Message message, SendResult sendResult) {
LOGGER.info("消息队列发送完成:topic={},tag={},msgId={},sendResult={}", message.getTopic(),
message.getTags(), message.getKeys(), Objects.nonNull(sendResult) ? sendResult : " result is null");
// LOGGER.info("消息队列发送完成:topic={},tag={},msgId={},sendResult={}", message.getTopic(),
// message.getTags(), message.getKeys(), Objects.nonNull(sendResult) ? sendResult : " result is null");
}
class RocketSendCallback implements SendCallback {
@Override
public void onSuccess(SendResult sendResult) {
LOGGER.info("send message success. topic={} msgId={}",
sendResult.getMessageQueue().getTopic(), sendResult.getMsgId());
// LOGGER.info("send message success. topic={} msgId={}",
// sendResult.getMessageQueue().getTopic(), sendResult.getMsgId());
}
@Override
public void onException(Throwable e) {
LOGGER.error("send message failed.", e);
// LOGGER.error("send message failed.", e);
}
}
......@@ -228,9 +227,9 @@ public class RocketMqProducerService implements SendCallback {
public void onException(Throwable e) {
if (e instanceof MqContextException) {
MqContextException context = (MqContextException) e;
LOGGER.error("send message failed. topic=" + context.getTopic() + ", msgId=" + context.getMessageId());
// LOGGER.error("send message failed. topic=" + context.getTopic() + ", msgId=" + context.getMessageId());
} else {
LOGGER.error("send message failed. =" + e);
// LOGGER.error("send message failed. =" + e);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment