From accd2d908841f6b4b437aed3ee8a854bdd7a66fb Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Wed, 14 Feb 2018 11:14:52 -0500 Subject: [PATCH] Debug logging for InboundGatewayTests --- .../integration/kafka/inbound/InboundGatewayTests.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/InboundGatewayTests.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/InboundGatewayTests.java index c26368e4a0..a014936499 100644 --- a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/InboundGatewayTests.java +++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/InboundGatewayTests.java @@ -28,6 +28,7 @@ import org.apache.kafka.clients.consumer.Consumer; import org.apache.kafka.clients.consumer.ConsumerConfig; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.junit.ClassRule; +import org.junit.Rule; import org.junit.Test; import org.springframework.beans.factory.BeanFactory; @@ -36,6 +37,7 @@ import org.springframework.integration.channel.QueueChannel; import org.springframework.integration.handler.advice.ErrorMessageSendingRecoverer; import org.springframework.integration.kafka.support.RawRecordHeaderErrorMessageStrategy; import org.springframework.integration.support.MessageBuilder; +import org.springframework.integration.test.rule.Log4j2LevelAdjuster; import org.springframework.kafka.core.ConsumerFactory; import org.springframework.kafka.core.DefaultKafkaConsumerFactory; import org.springframework.kafka.core.DefaultKafkaProducerFactory; @@ -83,6 +85,10 @@ public class InboundGatewayTests { public static KafkaEmbedded embeddedKafka = new KafkaEmbedded(1, true, topic1, topic2, topic3, topic4, topic5, topic6); + @Rule + public Log4j2LevelAdjuster adjuster = Log4j2LevelAdjuster.debug().categories("org.apache.kafka.clients", + "org.springframework.kafka", "org.springframework.integration"); + @Test public void testInbound() throws Exception { Map props = KafkaTestUtils.consumerProps("test1", "false", embeddedKafka);