我正在创建多个日志文件 Springboot
, log-back.xml
```
<appender name="FILE-AUDIT" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${HOME}/abc.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${HOME}/abc.%d{yyyy-MM-dd}.log</fileNamePattern>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%relative [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
// another log file
${HOME}mon.log
${HOME}/mon.%d{yyyy-MM-dd}.log
30
%relative [%thread] %-5level %logger{35} - %msg%n
<logger name="com.rh.project" level="debug">
<appender-ref ref="STDOUT" />
<appender-ref ref="SYSLOG" />
<appender-ref ref="FILE-AUDIT" />
</logger>
<logger name="mail-log" level="debug">
<appender-ref ref="STDOUT" />
<appender-ref ref="SYSLOG" />
<appender-ref ref="FILE" />
</logger>
1条答案
按热度按时间jyztefdp1#
你注意到第二个记录器里面的斜杠不见了吗??
我相信这就是问题所在。但是,与spring boot无关:)