From 06a5136b1a1002a5b081f9395dd5118ca92016fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E6=B2=90?= Date: Sat, 30 Apr 2022 00:12:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8logback?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fast-boot-framework/pom.xml | 10 -- fast-server/src/main/resources/log4j2.xml | 94 --------------- fast-server/src/main/resources/logback-spring.xml | 132 ++++++++++++++++++++++ 3 files changed, 132 insertions(+), 104 deletions(-) delete mode 100644 fast-server/src/main/resources/log4j2.xml create mode 100644 fast-server/src/main/resources/logback-spring.xml diff --git a/fast-boot-framework/pom.xml b/fast-boot-framework/pom.xml index 20a0e6c..6997dcc 100644 --- a/fast-boot-framework/pom.xml +++ b/fast-boot-framework/pom.xml @@ -12,12 +12,6 @@ org.springframework.boot spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-logging - - org.springframework.boot @@ -30,10 +24,6 @@ org.springframework.boot - spring-boot-starter-log4j2 - - - org.springframework.boot spring-boot-starter-test test diff --git a/fast-server/src/main/resources/log4j2.xml b/fast-server/src/main/resources/log4j2.xml deleted file mode 100644 index 6b0e4aa..0000000 --- a/fast-server/src/main/resources/log4j2.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/fast-server/src/main/resources/logback-spring.xml b/fast-server/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..eda71d2 --- /dev/null +++ b/fast-server/src/main/resources/logback-spring.xml @@ -0,0 +1,132 @@ + + + logback-spring + + + + + + + + + + + + + + + + debug + + + ${CONSOLE_LOG_PATTERN} + UTF-8 + + + + + + + ${logging.path}/debug.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${logging.path}/debug-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 30 + + + + debug + ACCEPT + DENY + + + + + ${logging.path}/info.log + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + ${logging.path}/info-%d{yyyy-MM-dd}.%i.log + + 100MB + + 30 + + + info + ACCEPT + DENY + + + + + ${logging.path}/warn.log + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + ${logging.path}/warn-%d{yyyy-MM-dd}.%i.log + + 100MB + + 30 + + + warn + ACCEPT + DENY + + + + + ${logging.path}/error.log + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + ${logging.path}/error-%d{yyyy-MM-dd}.%i.log + + 100MB + + 30 + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file