log4j.rootLogger=DEBUG,CONSOLE,FILE,A1
log4j.addivity.org.apache=true

# ??????
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=DEBUG
log4j.appender.CONSOLE.Target=System.out
log4j.appender.CONSOLE.Encoding=GBK
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.conOut.layout.ConversionPattern=%d %-5p [%c] %m%n

# ??????
#???????DailyRollingFileAppender???????maxBackupIndex,maxFileSize????#??????????????????2??????????????????????#RollingFileAppender????????????????????????
log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A1.File=../logs/laifusiadmin1.log
log4j.appender.A1.Encoding=GBK
log4j.appender.A1.Threshold=DEBUG
log4j.appender.A1.DatePattern='.'yyyy-MM-dd
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L : %m%n

#?????
#???????DailyRollingFileAppender???????maxBackupIndex,maxFileSize????#??????????????????2??????????????????????#RollingFileAppender????????????????????????
log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.FILE.Threshold=ERROR
log4j.appender.FILE.File=./logs/error_Log.log
log4j.appender.FILE.DatePattern='_'yyyy-MM-dd'.log'
#log4j.appender.File.MaxFileSize=100KB
#log4j.appender.File.MaxBackupIndex=100
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=%d %t %-5p [%c] %m%n

###显示SQL语句部分
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 
log4j.logger.java.sql.ResultSet = DEBUG

log4j.properties


web.xml


		log4jConfigLocation
		classpath:log4j.properties
	
	
		encodingFilter
		org.springframework.web.filter.CharacterEncodingFilter
		
			encoding
			utf-8
		
	


添加log4j-1.2.13.jar