解决方法:加上 <!DOCTYPE xml>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE xml>
<configuration>
<!--输出格式-->
<appender name="consoleLog" class="ch.qos.logback.core.ConsoleAppender">
<!--过滤掉所有低于WARN级别的日志-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>
[%d{MM-dd HH:mm:ss.SSS}] %-5level %logger{15} - %msg%n
</pattern>
</layout>
</appender>
<root level="DEBUG">
<appender-ref ref = "consoleLog"/>
</root>
</configuration>