diff --git a/pom.xml b/pom.xml index ae45bec..c8177df 100644 --- a/pom.xml +++ b/pom.xml @@ -23,6 +23,12 @@ org.springframework.boot spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + org.springframework.boot @@ -75,7 +81,7 @@ jaxb-impl 2.2.11 - + org.springframework.boot spring-boot-starter-test @@ -98,7 +104,6 @@ 1.0 compile - diff --git a/src/main/java/com/uci/inbound/Inbound.java b/src/main/java/com/uci/inbound/Inbound.java index 28792d9..7370a3e 100644 --- a/src/main/java/com/uci/inbound/Inbound.java +++ b/src/main/java/com/uci/inbound/Inbound.java @@ -10,8 +10,6 @@ import org.springframework.data.cassandra.repository.config.EnableReactiveCassandraRepositories; import org.springframework.kafka.annotation.EnableKafka; -import com.uci.dao.service.HealthService; - @EnableKafka @EnableReactiveCassandraRepositories("com.uci.dao") @EntityScan("com.uci.dao") @@ -24,7 +22,7 @@ @SpringBootApplication @ComponentScan(basePackages = {"com.uci.inbound", "com.uci.adapter", "com.uci.utils"}) public class Inbound { - public static void main(String[] args) { + public static void main(String[] args) throws InterruptedException { SpringApplication.run(Inbound.class, args); } } \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index d7c0d01..c451228 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -34,6 +34,10 @@ fusionauth.url = ${FUSIONAUTH_URL} fusionauth.key = ${FUSIONAUTH_KEY} +# log4j2 log topic config +kafka.logs.topic=${KAFKA_LOGS_TOPIC} + +log4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml new file mode 100644 index 0000000..61e2c0a --- /dev/null +++ b/src/main/resources/log4j2.xml @@ -0,0 +1,35 @@ + + + + ${env:KAFKA_LOGS_TOPIC} + ${env:BOOTSTRAP_SERVERS} + + + + + ${kafka.bootstrap.servers} + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file