mirror of
https://gitee.com/devlive-community/datacap.git
synced 2024-12-02 20:17:45 +08:00
44 lines
1.8 KiB
XML
44 lines
1.8 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
|
<property name="logPath" value="./logs" />
|
|
<property name="maxHistory" value="30" />
|
|
|
|
<appender name="CONSOLE_LOG" class="ch.qos.logback.core.ConsoleAppender">
|
|
<layout class="ch.qos.logback.classic.PatternLayout">
|
|
<pattern>%date %level [%thread] %logger [%file:%line] %msg%n</pattern>
|
|
</layout>
|
|
</appender>
|
|
|
|
<appender name="FILE_INFO_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
|
<level>INFO</level>
|
|
</filter>
|
|
<encoder>
|
|
<pattern>%date %level [%thread] %logger [%file:%line] %msg%n</pattern>
|
|
</encoder>
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
<fileNamePattern>${logPath}/info/%d.log</fileNamePattern>
|
|
<maxHistory>${maxHistory}</maxHistory>
|
|
</rollingPolicy>
|
|
</appender>
|
|
|
|
<appender name="FILE_ERROR_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
|
<level>ERROR</level>
|
|
</filter>
|
|
<encoder>
|
|
<pattern>%date %level [%thread] %logger [%file:%line] %msg%n</pattern>
|
|
</encoder>
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
<fileNamePattern>${logPath}/error/%d.log</fileNamePattern>
|
|
<maxHistory>60</maxHistory>
|
|
</rollingPolicy>
|
|
</appender>
|
|
|
|
<root level="INFO">
|
|
<appender-ref ref="CONSOLE_LOG" />
|
|
<appender-ref ref="FILE_INFO_LOG" />
|
|
<appender-ref ref="FILE_ERROR_LOG" />
|
|
</root>
|
|
</configuration>
|