log4j.properties
log4j.rootCategory=INFO,stdout,R #stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=[ZBB] %d{yyyy-MM-dd HH\:mm\:ss,SSS} [%t] [%c] [%p] - %m%n #File log4j.appender.R=org.apache.log4j.DailyRollingFileAppender log4j.appender.R.File=${catalina.home}\\logs\\ZBB\\zframe.log log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d-[ZBB] %d{yyyy-MM-dd HH\:mm\:ss,SSS} [%t] [%c] [%p] - %m%n #Class log4j.logger.org.apache.commons=INFO log4j.logger.org.displaytag=ERROR log4j.logger.org.springframework=INFO log4j.logger.org.apache.velocity=FATAL log4j.logger.org.hibernate=INFO log4j.logger.org.hibernate.SQL=DEBUG log4j.logger.com.zbb=DEBUG
原文:http://www.cnblogs.com/super-admin/p/6498670.html