This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git
commit df1c109b52108cf63813c16d23a3a66ac03a3453 Author: Lei Zhang <coolbee...@gmail.com> AuthorDate: Sat Sep 21 00:43:27 2019 +0800 SCB-1368 static variable name is written in upper case letters --- .../pack/alpha/fsm/channel/kafka/KafkaMessagePublisher.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/alpha/alpha-fsm/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaMessagePublisher.java b/alpha/alpha-fsm/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaMessagePublisher.java index 95de39b..52de8ef 100644 --- a/alpha/alpha-fsm/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaMessagePublisher.java +++ b/alpha/alpha-fsm/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaMessagePublisher.java @@ -26,7 +26,7 @@ import org.springframework.kafka.core.KafkaTemplate; public class KafkaMessagePublisher implements MessagePublisher<BaseEvent> { - private static final Logger logger = LoggerFactory.getLogger(KafkaMessagePublisher.class); + private static final Logger LOG = LoggerFactory.getLogger(KafkaMessagePublisher.class); private String topic; private KafkaTemplate<String, Object> kafkaTemplate; @@ -38,14 +38,13 @@ public class KafkaMessagePublisher implements MessagePublisher<BaseEvent> { @Override public void publish(BaseEvent data) { - if(logger.isDebugEnabled()){ - logger.debug("send message [{}] to [{}]", data, topic); + if(LOG.isDebugEnabled()){ + LOG.debug("send to kafka {} {} to {}", data.getGlobalTxId(), data.getType(), topic); } - try { kafkaTemplate.send(topic, data.getGlobalTxId(), data).get(); } catch (InterruptedException | ExecutionException | UnsupportedOperationException e) { - logger.error("publish Exception = [{}]", e.getMessage(), e); + LOG.error("publish Exception = [{}]", e.getMessage(), e); throw new RuntimeException(e); } }