- 
                Notifications
    You must be signed in to change notification settings 
- Fork 41.6k
Description
It would be useful to expose the AccessLog maxDays as an application property:
https://tomcat.apache.org/tomcat-8.5-doc/api/org/apache/catalina/valves/AccessLogValve.html#setMaxDays(int)
github link
and set it to the TomcatWebServerFactoryCustomizer and/or others:
https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizer.java#L255
Maybe:
server.tomcat.accesslog.max-days= 
Being able to set this as part of the application could make sure that the access logs are removed after certain days. This could be one way to solve an issue where the number of files (size of logs) grows indefinitely.
There does not appear to be access log rotation based on the size, which would solve the above issue.
However, this way it is one measure to not keep too many files.