Add maxFileSize and maxBackupIndex in logging.yml but won't work

(Makeyang) #1

my logging.yml looks like below:
type: dailyRollingFile
file: ${path.logs}/${}.log
datePattern: "'.'yyyy-MM-dd"
maxFileSize: 1GB
maxBackupIndex: 15
type: pattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

so how to achieve so?

(Jimferenczi) #2

The daily rolling file doesn't have a maxBackupIndex configuration, only the rolling file appender has it:
If you want to achieve the same functionality you'll have to write a custom appender.

(system) #3