1楼吃、maven配置:
<dependency>
????<groupId>org.slf4j</groupId>
????<artifactId>slf4j-api</artifactId>
????<version>1.7.21</version>
</dependency>
<dependency>
????<groupId>ch.qos.logback</groupId>
????<artifactId>logback-classic</artifactId>
????<version>1.2.3</version>
</dependency>
<dependency>
????<groupId>ch.qos.logback</groupId>
????<artifactId>logback-access</artifactId>
????<version>1.2.3</version>
</dependency>
2、logback.xml配置:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
????<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
????????<layout class="ch.qos.logback.classic.PatternLayout">
????????????<Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
????????</layout>
????</appender>
????????<root level="TRACE">
????????<appender-ref ref="STDOUT" />
????????</root>
</configuration>