refactor: 添加issue模块日志

This commit is contained in:
fit2-zhao 2023-05-09 14:30:39 +08:00
parent 0fe78f54ea
commit b6c4839382
1 changed files with 28 additions and 0 deletions

View File

@ -355,6 +355,34 @@
<appender-ref ref="workstationRefAppender"/>
</logger>
<!-- 自定义issue模块日志 -->
<appender name="issueAppender"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
<File>${logging.file.path}/issue.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<FileNamePattern>${logging.file.path}/history/issue.%d{yyyyMMdd}-%i.log</FileNamePattern>
<maxHistory>${logger.max.history:-30}</maxHistory>
<maxFileSize>50MB</maxFileSize>
</rollingPolicy>
<encoder>
<charset>UTF-8</charset>
<Pattern>%d %t %-5level %logger{36} %line - %msg%n</Pattern>
</encoder>
</appender>
<appender name="issueRefAppender" class="ch.qos.logback.classic.AsyncAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
<queueSize>10000</queueSize>
<appender-ref ref="issueAppender"/>
</appender>
<logger name="io.metersphere.issue" additivity="false" level="${logger.level:INFO}">
<appender-ref ref="issueRefAppender"/>
</logger>
<!-- 自定义API执行过程日志 -->
<appender name="apiRunLogAppender"
class="ch.qos.logback.core.rolling.RollingFileAppender">