my logging.yml looks like below: file: type: dailyRollingFile file: ${path.logs}/${cluster.name}.log datePattern: "'.'yyyy-MM-dd" maxFileSize: 1GB maxBackupIndex: 15 layout: type: pattern conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
so how to achieve so?
The daily rolling file doesn't have a maxBackupIndex configuration, only the rolling file appender has it: https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/RollingFileAppender.html If you want to achieve the same functionality you'll have to write a custom appender.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.