You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Rajamani Sriram <rs...@novell.com> on 2007/04/03 15:43:28 UTC

Log4J 1.3 alpha-8: FixedWindowRollingPolicy.setMaxIndex(99)

Hi,
 
I am using Log4J 1.3 alpha-8 FixedWindowRollingPolicy for RollingFileAppender to restrict the number of backed up log files. I want to restrict the number of backed up files to 99 files. For this, I use the API setMaxIndex(99). But always, log4j changes this value to 13.
 
In the documentation, it's specified that rollover algorithm requires as many file renaming operations as the window size, and hence large window sizes are discouraged. The current implementation will automatically reduce the window size to 12 when larger values are specified by the user.
http://logging.apache.org/log4j/docs/api-1.3/org/apache/log4j/rolling/FixedWindowRollingPolicy.html 
 
Is there a way to set this to 100, so that I can have upto 100 backed up files?
 
Thanks in advance,
Sriram