diff --git a/pom.xml b/pom.xml index a25ddbdb..12f63651 100644 --- a/pom.xml +++ b/pom.xml @@ -93,6 +93,12 @@ spring-boot-starter-data-redis + + net.logstash.logback + logstash-logback-encoder + 5.2 + + diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 1a50e47d..81b34ad0 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -51,4 +51,6 @@ kafka: id: test msgExchange: intervalSeconds: 5 +logstash: + host: 130.120.3.233:5000 \ No newline at end of file diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml new file mode 100644 index 00000000..790abe26 --- /dev/null +++ b/src/main/resources/logback-spring.xml @@ -0,0 +1,48 @@ + + + + + + + + ${loggingFile} + + ${loggingFile}.%i-%d{yyyy-MM-dd} + + 10MB + 60 + 20GB + + + %date %level [%thread] %logger{10} [%file:%line] %msg %n + + + + + ${elkHost} + + + + {"app_name":"cdariport","model_name":"msgexchangeapi"} + + + + + + + + + %date %level [%thread] %logger{10} [%file:%line] %msg %n + + + + + + + + + \ No newline at end of file