From 97020f5dfe48b364b82b183da4ddfba8e06faba8 Mon Sep 17 00:00:00 2001 From: lishangbu Date: Mon, 24 Sep 2018 15:11:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?:sparkles:=20=E6=B7=BB=E5=8A=A0=E6=96=B0?= =?UTF-8?q?=E7=89=B9=E6=80=A7=EF=BC=9Alogback=E6=8E=A7=E5=88=B6=E5=8F=B0?= =?UTF-8?q?=E5=BD=A9=E8=89=B2=E6=97=A5=E5=BF=97=EF=BC=8C=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E6=8C=81=E4=B9=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +- .../src/main/resources/logback-spring.xml | 55 +++++++++++++++++++ .../META-INF/spring-devtools.properties | 2 +- .../src/main/resources/logback-spring.xml | 55 +++++++++++++++++++ .../src/main/resources/logback-spring.xml | 55 +++++++++++++++++++ 5 files changed, 168 insertions(+), 3 deletions(-) create mode 100644 pigx-common/pigx-common-core/src/main/resources/logback-spring.xml create mode 100644 pigx-config/src/main/resources/logback-spring.xml create mode 100644 pigx-eureka/src/main/resources/logback-spring.xml diff --git a/.gitignore b/.gitignore index 956f4e305..6915694fa 100644 --- a/.gitignore +++ b/.gitignore @@ -37,10 +37,10 @@ target/ *.tar.gz ### logs #### -logs +/logs/ +*.log ### temp ignore ### -*.log *.cache *.diff *.patch diff --git a/pigx-common/pigx-common-core/src/main/resources/logback-spring.xml b/pigx-common/pigx-common-core/src/main/resources/logback-spring.xml new file mode 100644 index 000000000..578b8c92e --- /dev/null +++ b/pigx-common/pigx-common-core/src/main/resources/logback-spring.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + + + + + + ${log.path}/debug.log + + ${log.path}/%d{yyyy-MM}/debug.%d{yyyy-MM-dd}.%i.log.gz + 50MB + 30 + + + %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n + + + + + + ${log.path}/error.log + + ${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz + 50MB + 30 + + + %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n + + + ERROR + + + + + + + + + + diff --git a/pigx-common/pigx-common-log/src/main/resources/META-INF/spring-devtools.properties b/pigx-common/pigx-common-log/src/main/resources/META-INF/spring-devtools.properties index 76296deab..db34a0283 100644 --- a/pigx-common/pigx-common-log/src/main/resources/META-INF/spring-devtools.properties +++ b/pigx-common/pigx-common-log/src/main/resources/META-INF/spring-devtools.properties @@ -1 +1 @@ -restart.include.pigx-common-security=/pigx-common-log[\\w-]+\.jar +restart.include.pigx-common-log=/pigx-common-log[\\w-]+\.jar diff --git a/pigx-config/src/main/resources/logback-spring.xml b/pigx-config/src/main/resources/logback-spring.xml new file mode 100644 index 000000000..578b8c92e --- /dev/null +++ b/pigx-config/src/main/resources/logback-spring.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + + + + + + ${log.path}/debug.log + + ${log.path}/%d{yyyy-MM}/debug.%d{yyyy-MM-dd}.%i.log.gz + 50MB + 30 + + + %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n + + + + + + ${log.path}/error.log + + ${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz + 50MB + 30 + + + %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n + + + ERROR + + + + + + + + + + diff --git a/pigx-eureka/src/main/resources/logback-spring.xml b/pigx-eureka/src/main/resources/logback-spring.xml new file mode 100644 index 000000000..578b8c92e --- /dev/null +++ b/pigx-eureka/src/main/resources/logback-spring.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + + + + + + ${log.path}/debug.log + + ${log.path}/%d{yyyy-MM}/debug.%d{yyyy-MM-dd}.%i.log.gz + 50MB + 30 + + + %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n + + + + + + ${log.path}/error.log + + ${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz + 50MB + 30 + + + %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n + + + ERROR + + + + + + + + + + From d4cca9d47fdd256c193c6b51891046348a528dc1 Mon Sep 17 00:00:00 2001 From: lishangbu Date: Mon, 24 Sep 2018 15:18:09 +0800 Subject: [PATCH 2/2] =?UTF-8?q?:recycle:=E4=BC=98=E5=8C=96pom,=E5=8D=87?= =?UTF-8?q?=E7=BA=A7Spring=E4=BE=9D=E8=B5=96=E7=AE=A1=E7=90=86=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E4=B8=BACairo-SR3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 8a3a00a7a..58e6c8e59 100644 --- a/pom.xml +++ b/pom.xml @@ -29,18 +29,11 @@ pom https://www.pig4cloud.com - - org.springframework.boot - spring-boot-starter-parent - 2.0.4.RELEASE - - - 1.6.2 2.0.4.RELEASE Finchley.SR1 - Cairo-SR2 + Cairo-SR3 UTF-8 1.8 1.8 @@ -120,6 +113,13 @@ + + org.springframework.boot + spring-boot-dependencies + ${spring-boot.version} + pom + import + io.spring.platform platform-bom @@ -138,6 +138,7 @@ + ${project.name} @@ -150,7 +151,7 @@ - build-info + repackage @@ -180,8 +181,8 @@ maven-compiler-plugin - ${java.version} - ${java.version} + ${maven.compiler.target} + ${maven.compiler.source} UTF-8