我不知道为什么logback将日志写入控制台,请帮助谢谢。
<configuration debug="true" scan="true">
<appender name="FILE"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>/log/%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
%msg%n</pattern>
</encoder>
</appender>
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="FILE" />
<includeCallerData>true</includeCallerData>
</appender>
<root level="INFO">
<appender-ref ref="ASYNC" />
</root>
<root level="ERROR">
<appender-ref ref="ASYNC" />
</root>
</configuration>