This content has been marked as final.
Show 2 replies
-
1. Re: How to limit the number of log using jboss-log4j and daily appender
peterj Jun 23, 2010 3:48 PM (in response to hari_jboss)I recall someone asked this a while ago but I cannot locate the post. Anyway, there is no way to configure Log4J to limit the number of logs created with the DailyRollingFileAppender. The best you could do is write a script that deletes the oldest log file(s) and set that script to run automatically every day.
You could use a RollingFileAppender instead - it creates a new log file once the log file reaches a certain size, and you can tell it how many log files to retain.
-
2. Re: How to limit the number of log using jboss-log4j and daily appender
hari_jboss Jun 23, 2010 3:58 PM (in response to peterj)Thanks For Quick reply. I will then need to use Sizebased appender, thanks.