Got the same issue with 1.2.3 and we identified the bug in this piece of code: ``` /**
- Given date, convert this instance to a regular _expression_.
*
- Used to compute sub-regex when the pattern has both %d and %i, and the
- date is known.
*/ public String toRegexForFixedDate(Date date) { StringBuilder buf = new StringBuilder(); Converter<Object> p = headTokenConverter; while (p != null) { if (p instanceof LiteralConverter) { buf.append(p.convert(null)); } else if (p instanceof IntegerTokenConverter) { buf.append("( d{1,3})"); } else if (p instanceof DateTokenConverter) { buf.append(p.convert(date)); } p = p.getNext(); } return buf.toString(); } ```
and the problem happens when we have more than 1000 files created. Indeed, the above method only looks for file with index made of up to 3 digits (see `\d{1,3}`) while it should look for files with at least one digit (i.e. `\d+`). So basically it will keep `totalSizeCap/maxFileSize` files + all files with index >= 1000. And basically, after checking head of code we noticed it has a fix and it is described in https://jira.qos.ch/browse/LOGBACK-1175 |