tracker/target/classes/config/logback.xml

37 lines
1.5 KiB
XML
Raw Normal View History

2024-07-18 14:07:25 +08:00
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="server.log.location" value="./logs"/>
<timestamp key="byDay" datePattern="yyyy-MM-dd" timeReference="contextBirth" />
<!-- 日志最大的历史 30天 -->
<property name="maxHistory" value="90"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${server.log.location}/log_jyiot.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>${server.log.location}/%d{yyyy-MM-dd}_jyiot.log.zip</FileNamePattern>
<MaxHistory>${maxHistory}</MaxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="ERROR"/>
<!--logger name="java.sql.Connection" level="DEBUG"/-->
<!--logger name="java.sql.Statement" level="DEBUG"/-->
<!--logger name="java.sql.PreparedStatement" level="DEBUG"/-->
<root level="INFO">
<appender-ref ref="STDOUT"/>
<appender-ref ref="FILE"/>
</root>
<logger name="com.jingyi.iotserver">
<level value="DEBUG"/>
</logger>
</configuration>