Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…oard into develop-2.0.0
  • Loading branch information
idwenwen committed Dec 15, 2023
2 parents b98b943 + 3ededde commit 77a524d
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 237 deletions.
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,19 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
Expand Down
84 changes: 84 additions & 0 deletions src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2019 The FATE Authors. All Rights Reserved.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<Configuration status="ERROR" monitorInterval="60">
<Appenders>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout charset="UTF-8" pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} [%-5p] %c{1.}(%F:%L) - %m%n"/>
</Console>

<RollingFile name="info" fileName="logs/info.log"
filePattern="logs/%d{yyyy-MM-dd}/info.log">
<PatternLayout charset="UTF-8" pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} [%-5p] %c{1.}(%F:%L) - %m%n"/>
<Policies>
<TimeBasedTriggeringPolicy/>
</Policies>
<DefaultRolloverStrategy max="24"/>
</RollingFile>

<RollingFile name="error" fileName="logs/error.log"
filePattern="logs/%d{yyyy-MM-dd}/error.log">
<PatternLayout charset="UTF-8" pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} [%-5p] %c{1.}(%F:%L) - %m%n"/>
<Policies>
<TimeBasedTriggeringPolicy/>
</Policies>
<DefaultRolloverStrategy max="24"/>
</RollingFile>

<RollingFile name="debug" fileName="logs/debug.log"
filePattern="logs/%d{yyyy-MM-dd}/debug.log">
<PatternLayout charset="UTF-8" pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} [%-5p] %c{1.}(%F:%L) - %m%n"/>
<Policies>
<TimeBasedTriggeringPolicy/>
</Policies>
<DefaultRolloverStrategy max="24"/>
</RollingFile>

<RollingFile name="warn" fileName="logs/warn.log"
filePattern="logs/%d{yyyy-MM-dd}/warn.log">
<PatternLayout charset="UTF-8" pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} [%-5p] %c{1.}(%F:%L) - %m%n"/>
<Policies>
<TimeBasedTriggeringPolicy/>
</Policies>
<DefaultRolloverStrategy max="24"/>
</RollingFile>

<RollingFile name="httpclient" fileName="logs/httpclient.log"
filePattern="logs/%d{yyyy-MM-dd}/httpclient.log">
<PatternLayout charset="UTF-8" pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} [%-5p] %c{1.}(%F:%L) - %m%n"/>
<Policies>
<TimeBasedTriggeringPolicy/>
</Policies>
<DefaultRolloverStrategy max="24"/>
</RollingFile>

</Appenders>

<Loggers>

<AsyncLogger name="org.fedai.fate.board.conf.FeignConfig" level="debug" additivity="true">
<AppenderRef ref="httpclient"/>
</AsyncLogger>

<AsyncRoot level="info" includeLocation="true">
<AppenderRef ref="console" level="info"/>
<AppenderRef ref="info" level="info"/>
<AppenderRef ref="error" level="error"/>
<AppenderRef ref="debug" level="debug"/>
<AppenderRef ref="warn" level="warn"/>
</AsyncRoot>
</Loggers>
</Configuration>
134 changes: 0 additions & 134 deletions src/main/resources/logback.xml

This file was deleted.

Loading

0 comments on commit 77a524d

Please sign in to comment.