log4j.rootLogger=INFO, A1
log4j.logger.mqLogger=INFO, A2
log4j.additivity.mqLogger=false
log4j.appender.A1 = org.apache.log4j.RollingFileAppender
log4j.appender.A1.File = .../logs/biz.log
log4j.appender.A1.MaxFileSize=100MB
log4j.appender.A1.Append = true
log4j.appender.A1.MaxBackupIndex=1
log4j.appender.A1.DatePattern = '.'yyy-MM-dd
log4j.appender.A1.layout = org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss.SSS} %c{1} [%p] %m%n
log4j.appender.A2 = org.apache.log4j.RollingFileAppender
log4j.appender.A2.File = .../logs/mq.log
log4j.appender.A2.MaxFileSize=100MB
log4j.appender.A2.Append = true
log4j.appender.A2.MaxBackupIndex=1
log4j.appender.A2.DatePattern = '.'yyy-MM-dd
log4j.appender.A2.layout = org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss.SSS} %c{1} [%p] %m%n
Log4j 常用配置
点赞
收藏