|
|
@ -1,7 +1,8 @@
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<configuration>
|
|
|
|
<configuration>
|
|
|
|
|
|
|
|
<!-- 日志存放路径 -->
|
|
|
|
<property name="log.path" value="/home/ruoyi/logs" />
|
|
|
|
<property name="log.path" value="/home/ruoyi/logs" />
|
|
|
|
|
|
|
|
<!-- 日志输出格式 -->
|
|
|
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
|
|
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 控制台输出 -->
|
|
|
|
<!-- 控制台输出 -->
|
|
|
@ -14,8 +15,9 @@
|
|
|
|
<!-- 系统日志输出 -->
|
|
|
|
<!-- 系统日志输出 -->
|
|
|
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
|
<file>${log.path}/sys-info.log</file>
|
|
|
|
<file>${log.path}/sys-info.log</file>
|
|
|
|
|
|
|
|
<!-- 循环政策:基于时间创建日志文件 -->
|
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
|
<!-- 按天回滚 daily -->
|
|
|
|
<!-- 日志文件名格式 -->
|
|
|
|
<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
|
|
<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
|
|
<!-- 日志最大的历史 60天 -->
|
|
|
|
<!-- 日志最大的历史 60天 -->
|
|
|
|
<maxHistory>60</maxHistory>
|
|
|
|
<maxHistory>60</maxHistory>
|
|
|
@ -24,15 +26,20 @@
|
|
|
|
<pattern>${log.pattern}</pattern>
|
|
|
|
<pattern>${log.pattern}</pattern>
|
|
|
|
</encoder>
|
|
|
|
</encoder>
|
|
|
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
|
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
|
|
|
|
|
|
<!-- 过滤的级别 -->
|
|
|
|
<level>INFO</level>
|
|
|
|
<level>INFO</level>
|
|
|
|
|
|
|
|
<!-- 匹配时的操作:接收(记录) -->
|
|
|
|
<onMatch>ACCEPT</onMatch>
|
|
|
|
<onMatch>ACCEPT</onMatch>
|
|
|
|
|
|
|
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
|
|
<onMismatch>DENY</onMismatch>
|
|
|
|
<onMismatch>DENY</onMismatch>
|
|
|
|
</filter>
|
|
|
|
</filter>
|
|
|
|
</appender>
|
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
|
|
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
|
<file>${log.path}/sys-error.log</file>
|
|
|
|
<file>${log.path}/sys-error.log</file>
|
|
|
|
|
|
|
|
<!-- 循环政策:基于时间创建日志文件 -->
|
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
|
|
|
|
|
<!-- 日志文件名格式 -->
|
|
|
|
<fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
|
|
<fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
|
|
<!-- 日志最大的历史 60天 -->
|
|
|
|
<!-- 日志最大的历史 60天 -->
|
|
|
|
<maxHistory>60</maxHistory>
|
|
|
|
<maxHistory>60</maxHistory>
|
|
|
@ -41,8 +48,11 @@
|
|
|
|
<pattern>${log.pattern}</pattern>
|
|
|
|
<pattern>${log.pattern}</pattern>
|
|
|
|
</encoder>
|
|
|
|
</encoder>
|
|
|
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
|
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
|
|
|
|
|
|
<!-- 过滤的级别 -->
|
|
|
|
<level>ERROR</level>
|
|
|
|
<level>ERROR</level>
|
|
|
|
|
|
|
|
<!-- 匹配时的操作:接收(记录) -->
|
|
|
|
<onMatch>ACCEPT</onMatch>
|
|
|
|
<onMatch>ACCEPT</onMatch>
|
|
|
|
|
|
|
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
|
|
<onMismatch>DENY</onMismatch>
|
|
|
|
<onMismatch>DENY</onMismatch>
|
|
|
|
</filter>
|
|
|
|
</filter>
|
|
|
|
</appender>
|
|
|
|
</appender>
|
|
|
@ -61,13 +71,10 @@
|
|
|
|
</encoder>
|
|
|
|
</encoder>
|
|
|
|
</appender>
|
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 显示形成的sql、使用的参数、结果集 -->
|
|
|
|
<!-- 系统模块日志级别控制 -->
|
|
|
|
<!--
|
|
|
|
|
|
|
|
<logger name="java.sql" level="debug" />
|
|
|
|
|
|
|
|
<logger name="org.springframework.jdbc" level="debug" />
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<logger name="com.ruoyi" level="info" />
|
|
|
|
<logger name="com.ruoyi" level="info" />
|
|
|
|
|
|
|
|
<!-- Spring日志级别控制 -->
|
|
|
|
|
|
|
|
<logger name="org.springframework" level="warn" />
|
|
|
|
|
|
|
|
|
|
|
|
<root level="info">
|
|
|
|
<root level="info">
|
|
|
|
<appender-ref ref="console" />
|
|
|
|
<appender-ref ref="console" />
|
|
|
|