Jerry, As of now, log4j 2 does not support auto-delete on rollover. However, this is a commonly requested feature and is on the todo list. We just haven't gotten around to working on it yet.
The relevant Jira ticket is https://issues.apache.org/jira/browse/LOG4J2-435 Remko Sent from my iPhone > On 2015/09/03, at 7:06, "Boyang\(Jerry\) Peng" > <jerryp...@yahoo-inc.com.INVALID> wrote: > > Hello, > I am using RollingFileAppender to limit the number of log files. Is there a > way to use the > Default Rollover Strategy with a time %d{yyyy-MM-dd-HH-mm-ss} with a > <SizeBasedTriggeringPolicy size="100 MB"/> and set <DefaultRolloverStrategy > max="9"/>? How can use a time based format for the name of my log but limit > the number of logs to a certain number and after the limit is reached the > oldest log gets deleted? Is there a way to do this? > > Best, > Jerry --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org