From 6d342bd44c3dc1dd51a28fe456793c49ec397d4d Mon Sep 17 00:00:00 2001
From: "wei.peng" <123456>
Date: Thu, 20 Jun 2019 17:13:59 +0800
Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E9=93=BE=E6=8E=A5?=
=?UTF-8?q?=E8=B6=85=E6=97=B6=E5=BB=B6=E9=95=BF=20=E8=87=B3=205=20?=
=?UTF-8?q?=E5=88=86=E9=92=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/resources/application-dev.properties | 2 +-
.../main/resources/application-docker.properties | 6 +-
.../src/main/resources/application-prod.properties | 2 +-
.../src/main/resources/application-test.properties | 4 +-
.../src/main/resources/log4j2-spring-prod.xml | 55 ---------
.../src/main/resources/log4j2-spring-prod.xml.bak | 137 +++++++++++++++++++++
.../{log4j2-spring-test.xml => log4j2-spring.xml} | 13 +-
7 files changed, 152 insertions(+), 67 deletions(-)
delete mode 100644 modules/i3plus-core-apiservice/src/main/resources/log4j2-spring-prod.xml
create mode 100644 modules/i3plus-core-apiservice/src/main/resources/log4j2-spring-prod.xml.bak
rename modules/i3plus-core-apiservice/src/main/resources/{log4j2-spring-test.xml => log4j2-spring.xml} (82%)
diff --git a/modules/i3plus-core-apiservice/src/main/resources/application-dev.properties b/modules/i3plus-core-apiservice/src/main/resources/application-dev.properties
index 94cb0d0..9d71756 100644
--- a/modules/i3plus-core-apiservice/src/main/resources/application-dev.properties
+++ b/modules/i3plus-core-apiservice/src/main/resources/application-dev.properties
@@ -53,7 +53,7 @@ spring.datasource.max-wait=10000
spring.datasource.validation-query=SELECT 1
spring.datasource.test-on-borrow=false
spring.datasource.test-while-idle=true
-spring.datasource.time-between-eviction-runs-millis=18800
+spring.datasource.time-between-eviction-runs-millis=300000
##主数据源,读写
#impp.write.datasource.type=com.zaxxer.hikari.HikariDataSource
diff --git a/modules/i3plus-core-apiservice/src/main/resources/application-docker.properties b/modules/i3plus-core-apiservice/src/main/resources/application-docker.properties
index 57d0e95..c9e8e8f 100644
--- a/modules/i3plus-core-apiservice/src/main/resources/application-docker.properties
+++ b/modules/i3plus-core-apiservice/src/main/resources/application-docker.properties
@@ -7,7 +7,7 @@ impp.console.ip=http://console:8010
#服务注册中心(多注册中心逗号分隔)
impp.cluster.regist.center=http://register:8000/eureka/
#日志默认使用log4j2
-logging.config=classpath:log4j2-spring-prod.xml
+logging.config=classpath:log4j2-spring.xml
########平台相关参数##########
#是否开启redis缓存
@@ -53,7 +53,7 @@ spring.datasource.max-wait=10000
spring.datasource.validation-query=SELECT 1
spring.datasource.test-on-borrow=false
spring.datasource.test-while-idle=true
-spring.datasource.time-between-eviction-runs-millis=18800
+spring.datasource.time-between-eviction-runs-millis=300000
##主数据源,读写
#impp.write.datasource.type=com.zaxxer.hikari.HikariDataSource
@@ -65,7 +65,7 @@ impp.write.datasource.password=impp_i3_core_pwd
##辅数据源,只读
#impp.read.datasource.type=com.zaxxer.hikari.HikariDataSource
impp.read.datasource.driver-class-name=com.mysql.jdbc.Driver
-impp.read.datasource.jdbc-url=jdbc:mysql://dbslave:3306/impp_i3_core?autoReconnect=true&useSSL=false&characterEncoding=utf-8
+impp.read.datasource.jdbc-url=jdbc:mysql://dbmaster:3306/impp_i3_core?autoReconnect=true&useSSL=false&characterEncoding=utf-8
impp.read.datasource.username=impp_i3_core_user
impp.read.datasource.password=impp_i3_core_pwd
diff --git a/modules/i3plus-core-apiservice/src/main/resources/application-prod.properties b/modules/i3plus-core-apiservice/src/main/resources/application-prod.properties
index 9b6e8d3..450f9f9 100644
--- a/modules/i3plus-core-apiservice/src/main/resources/application-prod.properties
+++ b/modules/i3plus-core-apiservice/src/main/resources/application-prod.properties
@@ -53,7 +53,7 @@ spring.datasource.max-wait=10000
spring.datasource.validation-query=SELECT 1
spring.datasource.test-on-borrow=false
spring.datasource.test-while-idle=true
-spring.datasource.time-between-eviction-runs-millis=18800
+spring.datasource.time-between-eviction-runs-millis=300000
##主数据源,读写
#impp.write.datasource.type=com.zaxxer.hikari.HikariDataSource
diff --git a/modules/i3plus-core-apiservice/src/main/resources/application-test.properties b/modules/i3plus-core-apiservice/src/main/resources/application-test.properties
index cf31ed6..ec6000b 100644
--- a/modules/i3plus-core-apiservice/src/main/resources/application-test.properties
+++ b/modules/i3plus-core-apiservice/src/main/resources/application-test.properties
@@ -7,7 +7,7 @@ impp.console.ip=http://192.168.1.241:58010
#服务注册中心(多注册中心逗号分隔)
impp.cluster.regist.center=http://192.168.1.241:58000/eureka/
#日志默认使用log4j2
-logging.config=classpath:log4j2-spring-test.xml
+logging.config=classpath:log4j2-spring.xml
########平台相关参数##########
#是否开启redis缓存
@@ -53,7 +53,7 @@ spring.datasource.max-wait=10000
spring.datasource.validation-query=SELECT 1
spring.datasource.test-on-borrow=false
spring.datasource.test-while-idle=true
-spring.datasource.time-between-eviction-runs-millis=18800
+spring.datasource.time-between-eviction-runs-millis=300000
##主数据源,读写
#impp.write.datasource.type=com.zaxxer.hikari.HikariDataSource
diff --git a/modules/i3plus-core-apiservice/src/main/resources/log4j2-spring-prod.xml b/modules/i3plus-core-apiservice/src/main/resources/log4j2-spring-prod.xml
deleted file mode 100644
index c58e8a4..0000000
--- a/modules/i3plus-core-apiservice/src/main/resources/log4j2-spring-prod.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
- [%p] %d{yyyy-MM-dd HH:mm:ss-SSS} %l 信息:%m%n
- [%p] %d{yyyy-MM-dd HH:mm:ss-SSS} %c(%M:%L) 信息:%m%n
- [SYS-%p] %d{yyyy-MM-dd HH:mm:ss-SSS} 系统:%m ( %F -> %M:%L)%n
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${info_pattern}
-
-
-
-
-
- ${system_log_pattern}
-
-
-
-
-
- ${pattern}
-
-
-
-
-
-
-
-
- ${pattern}
-
-
-
-
\ No newline at end of file
diff --git a/modules/i3plus-core-apiservice/src/main/resources/log4j2-spring-prod.xml.bak b/modules/i3plus-core-apiservice/src/main/resources/log4j2-spring-prod.xml.bak
new file mode 100644
index 0000000..5dfcb6c
--- /dev/null
+++ b/modules/i3plus-core-apiservice/src/main/resources/log4j2-spring-prod.xml.bak
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+
+ ../logs/log4j2Logs
+
+
+
+ %d{yyyy-MM-dd HH:mm:ss} [%-5level] %l - %m%n
+
+ %d{yyyy-MM-dd HH:mm:ss} [%-5level] %c(%M:%L) - %m%n
+
+
+ 20MB
+
+ DEBUG
+
+
+ ${basePath}/all.log
+
+ ${basePath}/%d{yyyy-MM}/all-%d{yyyy-MM-dd}-%i.log.gz
+
+
+ 50
+
+
+ ${basePath}/info.log
+
+ ${basePath}/%d{yyyy-MM}/info-%d{yyyy-MM-dd}-%i.log.gz
+
+
+ 10
+
+
+ ${basePath}/warn.log
+
+ ${basePath}/%d{yyyy-MM}/warn-%d{yyyy-MM-dd}-%i.log.gz
+
+
+ 10
+
+
+ ${basePath}/error.log
+
+ ${basePath}/%d{yyyy-MM}/error-%d{yyyy-MM-dd}-%i.log.gz
+
+
+ 10
+
+
+ INFO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/i3plus-core-apiservice/src/main/resources/log4j2-spring-test.xml b/modules/i3plus-core-apiservice/src/main/resources/log4j2-spring.xml
similarity index 82%
rename from modules/i3plus-core-apiservice/src/main/resources/log4j2-spring-test.xml
rename to modules/i3plus-core-apiservice/src/main/resources/log4j2-spring.xml
index 8e00937..2796f82 100644
--- a/modules/i3plus-core-apiservice/src/main/resources/log4j2-spring-test.xml
+++ b/modules/i3plus-core-apiservice/src/main/resources/log4j2-spring.xml
@@ -3,8 +3,9 @@
-
-
+
+
+
[%p] %d{yyyy-MM-dd HH:mm:ss-SSS} %l 信息:%m%n
[%p] %d{yyyy-MM-dd HH:mm:ss-SSS} %c(%M:%L) 信息:%m%n
[SYS-%p] %d{yyyy-MM-dd HH:mm:ss-SSS} 系统:%m ( %F -> %M:%L)%n
@@ -19,7 +20,7 @@
-
+
@@ -28,12 +29,14 @@
${info_pattern}
-
+
${system_log_pattern}
-
+