Running CA Access Gateway (SPS), this one doesn't remove the old log file server.log and proxyui.log, and keep more than 10 files.
The amount of the rotated log files gets always higher.
Reading the configuration file, note that the strategy.max is applied by date only:
/{home_sps}/Tomcat/properties/logger.properties:
# strategy max as 10 indicates that the rollover log file is suffixed with
# the date and there will be a maximum 10 files for each day.
To validate that, set logger.properties that way for the server.log:
appender.SvrFileAppender.policies.size.type = SizeBasedTriggeringPolicy
appender.SvrFileAppender.policies.size.size = 2KB
appender.SvrFileAppender.policies.OnStartup.type = OnStartupTriggeringPolicy
appender.SvrFileAppender.strategy.type = DefaultRolloverStrategy
appender.SvrFileAppender.strategy.max = 2
Then, only 2 files with a size not exceeding 2K will be created by day, even if many times a restart of the CA Access Gateway (SPS) happens.
Configure the logger.properties file to retain the amount of files wanted daily, and use an external script to archive the files from past days, to keep only the daily log files in the log folder.