Commit b44d98e2 authored by liaozan's avatar liaozan 🏀

Update pom.xml

parent ecf82663
......@@ -740,6 +740,12 @@
</pluginRepositories>
<profiles>
<profile>
<id>schbrain</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<!-- 开发环境 -->
<profile>
<id>dev</id>
......
......@@ -12,19 +12,14 @@ import org.springframework.kafka.support.LoggingProducerListener;
@Slf4j
public class KafkaLoggingProducerListener extends LoggingProducerListener<Object, Object> {
public KafkaLoggingProducerListener() {
this.setIncludeContents(false);
}
@Override
public void onSuccess(ProducerRecord<Object, Object> record, RecordMetadata metadata) {
log.debug("[{}] 消息发送成功, content: {}", record.topic(), record.value());
log.info("[{}] 消息发送成功, content: {}", record.topic(), record.value());
}
@Override
public void onError(ProducerRecord<Object, Object> record, RecordMetadata metadata, Exception exception) {
log.warn("[{}] 消息发送失败, content: {}", record.topic(), record.value());
super.onError(record, metadata, exception);
}
}
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