Log4j:warn No Such property [Maxbackupindex] in or

Source: Internet
Author: User

Log4j:warn No Such property [Maxbackupindex] in Org.apache.log4j.DailyRollingFileAppender.
Log4j:warn No Such property [MaxFileSize] in Org.apache.log4j.DailyRollingFileAppender.

The warning means that the Dailyrollingfileappender class does not have a property maxbackupindex,maxfilesize, it is saved by date, so there is no need to set the 2 properties, if you want to set the size of the log file, Rollingfileappender can be extended to this class, usually in the development of the log configuration file need to pay attention to the settings.

#以下红色的2点不需要设置

Log4j.rootlogger=info,r,stdout
Log4j.appender.r=org.apache.log4j.dailyrollingfileappender
Log4j.appender.r.file=log/loginfo.txt

log4j.appender.r.maxfilesize=500kb
log4j.appender.r.maxbackupindex=10
Log4j.appender.r.layout=org.apache.log4j.patternlayout
Log4j.appender.r.layout.conversionpattern=%d{yyyy-mm-dd hh:mm:ss,sss} [%t] [%c] [%p]-%m%n
Log4j.logger.com.innet.application.model=error

Log4j:warn No Such property [Maxbackupindex] in or

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.