From dc1b406d3d35d76122d7b219371e44091d69449c Mon Sep 17 00:00:00 2001 From: "xueli.xue" Date: Fri, 28 Apr 2017 23:28:29 +0800 Subject: [PATCH] =?UTF-8?q?spring-boot=20=E6=97=A5=E5=BF=97=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8Clogback?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/log4j.xml | 6 +++ .../src/main/resources/application.properties | 9 ++++- .../src/main/resources/log4j.xml | 27 -------------- .../src/main/resources/logback.xml | 37 +++++++++++++++++++ 4 files changed, 51 insertions(+), 28 deletions(-) delete mode 100644 xxl-job-executor-springboot-example/src/main/resources/log4j.xml create mode 100644 xxl-job-executor-springboot-example/src/main/resources/logback.xml diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml index 849a3fd3..cd593b86 100644 --- a/xxl-job-executor-example/src/main/resources/log4j.xml +++ b/xxl-job-executor-example/src/main/resources/log4j.xml @@ -24,4 +24,10 @@ + + \ No newline at end of file diff --git a/xxl-job-executor-springboot-example/src/main/resources/application.properties b/xxl-job-executor-springboot-example/src/main/resources/application.properties index bafddced..3d944535 100644 --- a/xxl-job-executor-springboot-example/src/main/resources/application.properties +++ b/xxl-job-executor-springboot-example/src/main/resources/application.properties @@ -1 +1,8 @@ -server.port=8081 \ No newline at end of file +# web port +server.port=8081 + +# log config +logging.config=classpath:logback.xml + + + diff --git a/xxl-job-executor-springboot-example/src/main/resources/log4j.xml b/xxl-job-executor-springboot-example/src/main/resources/log4j.xml deleted file mode 100644 index d9d47046..00000000 --- a/xxl-job-executor-springboot-example/src/main/resources/log4j.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/xxl-job-executor-springboot-example/src/main/resources/logback.xml b/xxl-job-executor-springboot-example/src/main/resources/logback.xml new file mode 100644 index 00000000..3eeb2f05 --- /dev/null +++ b/xxl-job-executor-springboot-example/src/main/resources/logback.xml @@ -0,0 +1,37 @@ + + + + logback + + + + + + %d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n + + + + + ${log.path} + + ${log.path}.%d{yyyy-MM-dd}.zip + + + %date %level [%thread] %logger{36} [%file : %line] %msg%n + + + + + + + + + + + + \ No newline at end of file