#定义LOG输出级别
log4j.rootLogger=INFO,Console,File
#定义日志输出目的地为控制台
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.Target=System.out
#可以灵活地指定日志输出格式,下面一行是指定具体的格式 [%c] - %m%n
log4j.appender.Console.layout = org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=[%p] [%d{yyyy-MM-ddHH:mm:ss}][%c]%m%n
#文件大小到达指定尺寸的时候产生一个新的文件
log4j.appender.File =org.apache.log4j.RollingFileAppender
#指定输出目录
log4j.appender.File.File = logs/bss.log
#定义文件最大大小
log4j.appender.File.MaxFileSize = 10MB
# 输出所以日志,如果换成DEBUG表示输出DEBUG以上级别日志
log4j.appender.File.Threshold = DEBUG
log4j.appender.File.layout =org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern =[%p] [%d{yyyy-MM-ddHH:mm:ss}][%c]%m%n
log4j.logger.com.gta.bss=DEBUG,bss
log4j.additivity.com.gta.bss=false
log4j.appender.bss = org.apache.log4j.DailyRollingFileAppender
log4j.appender.bss.File =${CATALINA_HOME}/logs/bss.log
log4j.appender.bss.DatePattern = '.'yyyy-MM-dd
log4j.appender.bss.Append =true
log4j.appender.bss.layout = org.apache.log4j.PatternLayout
log4j.appender.bss.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [%c]-[%p] %m%n
# MyBatis logging configuration...
log4j.logger.com.gta.bss.dao=DEBUG
#ibatis logger config
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