slf4j使用
pom jar包引用
<!-- Logging -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.11</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.11</version>
</dependency>
<!-- Logging -->
类引用
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
创建对象(当前类名)
private final static Logger log = LoggerFactory.getLogger(ClassName.class);