From fb4cf15e1ab3b2741c1b3da51555de82a90b317b Mon Sep 17 00:00:00 2001
From: zhouxiunai <154707516@qq.com>
Date: Fri, 14 Dec 2018 11:37:19 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97=E5=88=B0EL?=
=?UTF-8?q?K?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 6 ++++
src/main/resources/application-dev.yml | 2 ++
src/main/resources/logback-spring.xml | 48 ++++++++++++++++++++++++++
3 files changed, 56 insertions(+)
create mode 100644 src/main/resources/logback-spring.xml
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