resource\log4j.properties:
# Global logging configuration 开发时候建议使用 debug # 优先级由高到低:OFF>FATAL>ERROR>WARN>INFO>DEBUG>ALL log4j.rootLogger=debug, stdout # Console output... log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %l %m%n
trait IceTra { protected final val log : Logger= LoggerFactory.getLogger(this.getClass()) }
<dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.5</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>1.2.3</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.2.3</version> </dependency>