ZT:http://www.javaeye.com/topic/49918
----------------------------------------------------------------------------------------------------------
- # Set root logger level to ERROR.
- log4j.rootLogger=ALL, error, errorcsle
- log4j.appender.error=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.error.File=logs/errors.log
- log4j.appender.error.layout=org.apache.log4j.PatternLayout
- log4j.appender.error.layout.ConversionPattern=[%d]-%-5p (%F:%L)|%m%n
- log4j.appender.error.DatePattern='.'yyyy-MM-dd
- log4j.appender.error.Threshold=ERROR
- #################################
- # CONSOLE #
- #################################
- log4j.appender.console=org.apache.log4j.ConsoleAppender
- log4j.appender.console.layout=org.apache.log4j.PatternLayout
- log4j.appender.console.layout.ConversionPattern=(%F:%L)|%m%n
- log4j.appender.errorcsle=org.apache.log4j.ConsoleAppender
- log4j.appender.errorcsle.layout=org.apache.log4j.PatternLayout
- log4j.appender.errorcsle.layout.ConversionPattern=%-5p (%F:%L)|%m%n
- log4j.appender.errorcsle.Threshold=ERROR
- #################################
- # ENF #
- #################################
- log4j.logger.com.esoon.ps=DEBUG, logic
- log4j.appender.logic=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.logic.File=logs/logic.log
- log4j.appender.logic.layout=org.apache.log4j.PatternLayout
- log4j.appender.logic.layout.ConversionPattern=[%d]-%-5p (%F:%L)|%m%n
- log4j.appender.logic.DatePattern='.'yyyy-MM-dd
- #################################
- # HBT #
- #################################
- log4j.logger.org.hibernate=DEBUG, HBT
- #log4j.logger.cirrus.hibernate.ps.PreparedStatementCache=info, HBT
- #log4j.logger.cirrus.hibernate.type=info, HBT
- log4j.appender.HBT=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.HBT.File=logs/hbt.log
- log4j.appender.HBT.layout=org.apache.log4j.PatternLayout
- log4j.appender.HBT.layout.ConversionPattern=[%d]-%-5p %c{1}|%m%n
- log4j.appender.HBT.DatePattern='.'yyyy-MM-dd
----------------------------------------------------------------------------------------------------------
记录起来,作为参考