配置文件

# Set root logger level to DEBUG and set its appender to stdout and DR.
log4j.rootLogger=WARN,stdout,R

# stdout is set to be a ConsoleAppender.
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%-4r [%-d{yyyy-MM-dd HH:mm:ss,SSS}] [%t] %-5p [%l] - %m%n

# R is set to be a RollingFileAppender.
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=C:/tmp/xxxx.log
log4j.appender.R.MaxFileSize=20000KB
log4j.appender.R.MaxBackupIndex=3
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%-4r [%-d{yyyy-MM-dd HH:mm:ss,SSS}] [%t] %-5p [%l] - %m%n


# longtop log
log4j.logger.java.sql=WARN, R
#log4j.logger.org.dragon=WARN, R
#log4j.logger.org.roy.flower=WARN, R
log4j.logger.com.longtop.fushun=WARN, R
#log4j.logger.com.longtop.ea=WARN, R
#log4j.logger.com.longtop.login=WARN, R
#log4j.logger.com.longtop.org=WARN, R
#log4j.logger.com.longtop.purview=WARN, R
#log4j.logger.com.longtop.purview.store=WARN, R
#com.longtop.fushun.cbm.webaction=WARN, R

# SqlMap logging configuration...
log4j.logger.com.ibatis=WARN
log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=WARN
log4j.logger.com.ibatis.common.jdbc.ScriptRunner=WARN
log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=WARN
log4j.logger.java.sql.Connection=WARN
log4j.logger.java.sql.Statement=WARN
log4j.logger.java.sql.PreparedStatement=WARN
log4j.logger.java.sql.ResultSet=WARN

# DR is set to be a DailyRollingFileAppender.
#log4j.appender.DR=org.apache.log4j.DailyRollingFileAppender
#log4j.appender.DR.file=C:/tmp/fushun_wz.log
#log4j.appender.DR.DatePattern='.'yyyyMMdd'.txt'
#log4j.appender.DR.layout=org.apache.log4j.PatternLayout
#log4j.appender.DR.layout.ConversionPattern=%-4r [%-d{yyyy-MM-dd HH:mm:ss,SSS}] [%t] %-5p [%l] - %m%n

### Set root logger level to DEBUG and its only appender to A1.
##log4j.rootLogger=WARN, A1
##
### A1 is set to be a ConsoleAppender.
##log4j.appender.A1=org.apache.log4j.ConsoleAppender
##
### A1 uses PatternLayout.
##log4j.appender.A1.layout=org.apache.log4j.PatternLayout
##log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

你可能感兴趣的:(apache,sql,log4j,ibatis,jdbc)