Details
- 
    Bug 
- 
    Resolution: Duplicate
- 
    Major 
- 
    None
- 
    1.1.10
- 
    None
Description
I am using SizeAndTimeBasedRollingPolicy and I was wondering why logback ignores my totalSizeCap settings. totalSizeCap was set to 5GB and the total size of my log files was about 8GB. I started my application (a Spring Boot Application) and no files were removed. When testing with smaller settings (256MB totalSizeCap) files were removed as expected.
So I debugged TimeBasedArchiveRemover.capTotalSize and found out that totalSize got negative. Making totalSize (and totalRemoved) long instead of int should fix the problem.
Attachments
Issue Links
- duplicates
- 
                    LOGBACK-1231 Size capping does not work for files of ~2G or more -         
- Resolved
 
-