Hello there...
I would like to know if is it possible to setup a DailyRollingFileAppender to create at maximum 10 files, i mean, i would like to create daily logs for the last 10 days, do not matter the file's size.
I know that RollingFileAppender does something like that, that is, limit the number of files, but i was not able to do the same with DailyRollingFileAppender .
Thanks in advance.
According to http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html, there is no such option.
You could create a cron job that runs just after the log file rollover occurs, and have it delete the oldest file.