log4j写入控制台和文件
log4j.rootLogger=INFO,CONSOLE,fileout
#CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d %p [%c] - %m%n
log4j.appender.CONSOLE.Threshold=INFO
#OutFile
log4j.appender.fileout=org.apache.log4j.DailyRollingFileAppender
log4j.appender.fileout.layout=org.apache.log4j.PatternLayout
log4j.appender.fileout.layout.ConversionPattern=[%d]%m%n
#会在工作空间所在的根目录生成对应的文件
log4j.appender.fileout.File=/myself_pjt/office_web.log
log4j.appender.fileout.DatePattern='_'yyyy-MM-dd'.log'
log4j.logger.com.ibatis=debug
log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=debug
log4j.logger.com.ibatis.common.jdbc.ScriptRunner=debug
log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=debug
log4j.logger.java.sql.Connection=debug
log4j.logger.java.sql.Statement=debug
log4j.logger.java.sql.PreparedStatement=debug,stdout