log4j配置实例

log4j.rootLogger=DEBUG

 

log4j.appender.stdout=org.apache.log4j.ConsoleAppender

log4j.appender.stdout.Target=System.out

log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c:%L - %m%n

 

 

log4j.logger.com.qugl.test=DEBUG, TestLogAppender

log4j.additivity.com.qugl.test=true

log4j.appender.TestLogAppender=org.apache.log4j.DailyRollingFileAppender

log4j.appender.TestLogAppender.File=${catalina.base}/logs/project_logs/test/test.log

log4j.appender.TestLogAppender.DatePattern='_'yyyy-MM-dd-HH

log4j.appender.TestLogAppender.layout=org.apache.log4j.PatternLayout

log4j.appender.TestLogAppenderlayout.ConversionPattern=%5p %d{yyyy/MM/dd HH:mm:ss.SSS} %F %M: %m%n

 

你可能感兴趣的:(log4j配置实例)