log4j.rootLogger=ERROR, stdout, logfile
log4j.logger.accessLogger=INFO, stdout, accessLogger
log4j.logger.errorLogger=ERROR, stdout, errorLogger
log4j.logger.dbLogger=INFO, dbLogger
log4j.logger.batchLogger=INFO,batchLogger
log4j.logger.java.sql.Connection=debug,dbLogger
log4j.logger.java.sql.Statement=debug,dbLogger
log4j.logger.java.sql.PreparedStatement=debug,dbLogger
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %p [%c] - %m%n
log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logfile.File=${webapp.root}/WEB-INF/logs/eBankingLog
log4j.appender.logfile.DatePattern='.'yyyyMMdd
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d{HH:mm:ss} %p [%c] - %m%n
log4j.appender.accessLogger=org.apache.log4j.DailyRollingFileAppender
log4j.appender.accessLogger.File=${webapp.root}/WEB-INF/logs/access/accessLog
log4j.appender.accessLogger.DatePattern='.'yyyyMMdd
log4j.appender.accessLogger.layout=org.apache.log4j.PatternLayout
log4j.appender.accessLogger.layout.ConversionPattern=%d{HH:mm:ss} - %m%n
log4j.appender.errorLogger=org.apache.log4j.DailyRollingFileAppender
log4j.appender.errorLogger.File=${webapp.root}/WEB-INF/logs/error/errorLog
log4j.appender.errorLogger.DatePattern='.'yyyyMMdd
log4j.appender.errorLogger.layout=org.apache.log4j.PatternLayout
log4j.appender.errorLogger.layout.ConversionPattern=%d{HH:mm:ss} %p [%c] - %m%n
log4j.appender.dbLogger=org.apache.log4j.DailyRollingFileAppender
log4j.appender.dbLogger.File=${webapp.root}/WEB-INF/logs/db/dbLog
log4j.appender.dbLogger.DatePattern='.'yyyyMMdd
log4j.appender.dbLogger.layout=org.apache.log4j.PatternLayout
log4j.appender.dbLogger.layout.ConversionPattern=%d{HH:mm:ss} %p - %m%n
log4j.appender.batchLogger=org.apache.log4j.DailyRollingFileAppender
log4j.appender.batchLogger.File=${webapp.root}/WEB-INF/logs/batch/batchLog
log4j.appender.batchLogger.DatePattern='.'yyyyMMdd
log4j.appender.batchLogger.layout=org.apache.log4j.PatternLayout
log4j.appender.batchLogger.layout.ConversionPattern=%d{HH:mm:ss} %p - %m%n
log4j.rootLogger 或者是 log4j.logger.*** = A,B,C..
rootLogger是所有的log都会出来的
log4j.logger.***会对应***的log出来,***可以通过logfactory.getlog(class)或者logfactory.getlog(String)得到。
A是log级别,BC..代表log输出的方向,一般是考虑console或者file。
当然还有log文件的大小等等