Why Logback maxHistory Is NOT Deleting Old Log Files | Spring Boot Deep Dive

In this video, we dive deep into Logback rolling policies and the `maxHistory` configuration in Spring Boot. Many developers expect old log files to be deleted automatically after a certain period, but Logback’s actual behavior can sometimes feel confusing or unexpected. In this demo, I show multiple real scenarios where old log files are NOT deleted, explain why it happens internally, and discuss what can be done in such situations. Topics covered: Quick overview of Java logging frameworks SLF4J, Logback, Log4j2 and Spring Boot logging basics Rolling policies Understanding `maxHistory` Why older log files may remain undeleted Time-based rolling behavior Multiple demo scenarios and edge cases Practical solutions and recommendations This is an intermediate-to-advanced topic intended for developers who already have basic knowledge of: Spring Boot Java logging concepts Logback configuration The video includes hands-on demos and real examples to help you understand Logback behavior beyond just configuration snippets. #SpringBoot #Java #Logback #SLF4J #Logging #BackendDevelopment #JavaDevelopment