I did some testing recently by porting fix of
LOGBACK-1166 to our project which needs this fix urgently.
It seems this fix still cannot fix totalSizeCap issue entirely. It cannot cover below case:
1. If we are using release 1.1.7 and it already got lots of logs (size is more than 2^31 -1 ~= 2G), It doesn't work if I hope that this fix can help to clean the old logs through upgrading.
2. If we configure totalSizeCap more than 2^31 -1 ~= 2G, it seems it will get overflow when we go through the file length. (I didn't test this one, it seems it is an issue with my understanding).
After checked the code, it seems we need to change the local variable (totalSize and totalRemoved)'s type from int to long in function void capTotalSize(Date now) in file logback-core/src/main/java/ch/qos/logback/core/rolling/helper/TimeBasedArchiveRemover.java.