MyBatis-log for java -log4日志相关
1 <dependency> 2 <!-- log for java --> 3 <groupId>log4j</groupId> 4 <artifactId>log4j</artifactId> 5 <version>1.2.17</version> 6 </dependency>
依赖
### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %m%n
### direct messages to file mylog.log ###
### log4j.appender.file=org.apache.log4j.FileAppender
### log4j.appender.file.File=d:mylog.log
### log4j.appender.file.layout=org.apache.log4j.PatternLayout
### log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %m%n
### set log levels - for more verbose logging change 'debug?info?warn?error' ###
### log4j.rootLogger=debug,stdout,file
log4j.rootLogger=debug,stdout
#error warning info debug
本文来自博客园,作者:喵酱爱吃鱼,转载请注明原文链接:https://www.cnblogs.com/zhangyuanmingboke/p/15342915.html