From 97020f5dfe48b364b82b183da4ddfba8e06faba8 Mon Sep 17 00:00:00 2001 From: lishangbu Date: Mon, 24 Sep 2018 15:11:45 +0800 Subject: [PATCH] =?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 + + + + + + + + + +