我开始在我的日志文件中看到奇怪的输出:
2018-11-14 14:04:21,180 [main] [34mINFO [0; 39m com.zaxxer.hikari.HikariDataSource-HikariPool-1-已启动关机... 2018-11-14 14:04:21,186 [main] [34mINFO [0; 39m com.zaxxer.hikari.HikariDataSource-HikariPool-1-关闭已完成。`
我不知道[34m
或[0;39m
是什么意思,为什么在这里。
我的 logback.xml 配置:
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>server.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>server.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>50MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<charset>UTF-8</charset>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%d [%thread] (%level) %logger{50} - %msg%n</pattern>
</layout>
</encoder>
</appender>
<root level="info">
<appender-ref ref="FILE" />
</root>