### set log levels ###
log4j.rootLogger = debug,stdout,file
# MyBatis logging configuration...
log4j.logger.org.mybatis.example=DEBUG
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}]-[%t-%5p]-[%C-%M(%L)]: %m%n
#所有文件输出
log4j.appender.file = org.apache.log4j.FileAppender
log4j.appender.file.File = D:/class111.log
log4j.appender.file.Encoding=UTF-8
log4j.appender.file.name = fileLogDemo
log4j.appender.file.Threshold=DEBUG
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=[%-d{yyyy-MM-dd HH:mm:ss}]-[%t-%5p]-[%C-%M(%L)]: %m%n
log4j.appender.file.append = true
log4j.properties
最新推荐文章于 2024-07-26 09:27:23 发布