2017-09-21 59 views
0

對應於log4j的錯誤。Log4j RollingFileAppender未知錯誤

log4j:WARN No such property [datePattern] in org.apache.log4j.RollingFileAppender. 
log4j:WARN No such property [datePattern] in org.apache.log4j.RollingFileAppender. 
log4j:WARN No such property [datePattern] in org.apache.log4j.RollingFileAppender. 

有兩個文件帶有log4j.properties。 一個在資源中,另一個放在一個單獨的目錄中。 我把他們兩個結合在一起。

我log4j.properties文件:

log4j.rootLogger=INFO,R 
log4j.logger.org.apache.activemq=INFO 
log4j.logger.org.apache.activemq.broker.TransportConnection=INFO 
log4j.logger.org.springframework=INFO 
log4j.logger.medagate=DEBUG 
log4j.appender.R=org.apache.log4j.RollingFileAppender 
log4j.appender.R.File=./logs/medagateRabbitMQ.log 
log4j.appender.R.MaxFileSize=10MB 
log4j.appender.R.MaxBackupIndex=30 
log4j.appender.R.DatePattern='.'yyyy-MM-dd 
log4j.appender.R.layout=org.apache.log4j.PatternLayout 
log4j.appender.R.layout.ConversionPattern=%d %-5p [%c{1}] %m%n 
log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer 
log4j.rootLogger=INFO, out, R 
log4j.logger.org.apache.camel.impl.converter=INFO 
log4j.logger.org.apache.camel.util.ResolverUtil=INFO 
log4j.logger.org.apache.activemq.broker.TransportConnection=WARN 
log4j.logger.org.springframework=WARN 
log4j.logger.org.hibernate=WARN 
log4j.logger.net.lshift.camel.component.rabbitmq=DEBUG 
log4j.logger.maxim=DEBUG 
log4j.appender.out=org.apache.log4j.ConsoleAppender 
log4j.appender.out.layout=org.apache.log4j.PatternLayout 
log4j.appender.R=org.apache.log4j.RollingFileAppender 
log4j.appender.R.File=./logs/medagateRabbitMQ.log 
log4j.appender.R.MaxFileSize=100KB 
log4j.appender.R.MaxBackupIndex=10 
log4j.appender.R.DatePattern='.'yyyyMMdd 
log4j.appender.R.layout=org.apache.log4j.PatternLayout 
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n 
log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer 
+0

爲什麼你將它們結合在一起成一個?這樣你就可以在你的房產文件中重複輸入 – pleft

+0

我沒有將它們合併到課程中,而是將它們組合在一起顯示在這裏。 – NitKrish

回答