|
|
|
@ -1,16 +1,38 @@
|
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
|
|
|
|
<!-- 日志存放路径 -->
|
|
|
|
|
<property name="log.path" value="logs/ruoyi-visual-monitor" />
|
|
|
|
|
<property name="log.path" value="logs/ruoyi-monitor" />
|
|
|
|
|
<!-- 日志输出格式 -->
|
|
|
|
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
|
|
|
|
<property name="console.log.pattern"
|
|
|
|
|
value="%red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
|
|
|
|
|
<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"/>
|
|
|
|
|
|
|
|
|
|
<!-- 控制台输出 -->
|
|
|
|
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
|
|
|
<encoder>
|
|
|
|
|
<pattern>${log.pattern}</pattern>
|
|
|
|
|
</encoder>
|
|
|
|
|
</appender>
|
|
|
|
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
|
|
|
<encoder>
|
|
|
|
|
<pattern>${console.log.pattern}</pattern>
|
|
|
|
|
<charset>utf-8</charset>
|
|
|
|
|
</encoder>
|
|
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
|
<!-- 控制台输出 -->
|
|
|
|
|
<appender name="file_console" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
|
|
<file>${log.path}/console.log</file>
|
|
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
|
|
<!-- 日志文件名格式 -->
|
|
|
|
|
<fileNamePattern>${log.path}/console.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
|
|
|
<!-- 日志最大 1天 -->
|
|
|
|
|
<maxHistory>1</maxHistory>
|
|
|
|
|
</rollingPolicy>
|
|
|
|
|
<encoder>
|
|
|
|
|
<pattern>${log.pattern}</pattern>
|
|
|
|
|
<charset>utf-8</charset>
|
|
|
|
|
</encoder>
|
|
|
|
|
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
|
|
|
|
<!-- 过滤的级别 -->
|
|
|
|
|
<level>INFO</level>
|
|
|
|
|
</filter>
|
|
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
|
<!-- 系统日志输出 -->
|
|
|
|
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
|
@ -70,5 +92,6 @@
|
|
|
|
|
<root level="info">
|
|
|
|
|
<appender-ref ref="file_info" />
|
|
|
|
|
<appender-ref ref="file_error" />
|
|
|
|
|
<appender-ref ref="file_console" />
|
|
|
|
|
</root>
|
|
|
|
|
</configuration>
|