On Mar 15, 2010, at 6:48 PM, Doal Miller wrote:

> I've been playing around with the RollingFileAppender out of the extra jar 
> and I've gotten it working in a couple of different ways but I'm not getting 
> exactly what I want.
> 
> What I want is to roll a file when the maximum size is reached and to keep a 
> large number of files around, like around 250. With my following 
> configuration file it rolls at 10,000 bytes but the FixedWindowRollingPolicy 
> doesn't allow me to keep over 12 files. If I try to set MaxIndex higher than 
> 12 it complains and resets it. I tried using the TimeBasedRollingPolicy 
> instead, in conjunction with SizeBasedTriggeringPolicy but I guess 
> TimeBasedRollingPolicy uses its own triggering policy.
> 
> Is there a way to set the max number of files for the 
> FixedWindowRollingPolicy to 250 without cracking open the code?
> 
> Thanks in advance for any suggestions.
> 
 The limit on maximum files was added since things get very slow if you rename 
250 files one at a time (delete .250, rename .249 to .250, rename .248 to .249, 
etc).

Renaming log files is inherently risky and platform dependent.  Writing an RFA 
alternative using java.nio and avoiding renames has been on my to-do list for a 
long time.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to