Re: DefaultRolloverStrategy max attribute and IfAccumulatedFileCount

2016-10-18 Thread Remko Popma
You need to explicitly set max if you want to keep more files around than the 
default. The Delete action is currently not aware of max. 

I'm not sure if it would be a good idea to change that and for example 
automatically ignore the (implicit or explicit) max value when a Delete rule is 
configured. 

Sent from my iPhone

> On 19 Oct 2016, at 3:03, Benjamin Jaton  wrote:
> 
> Hello,
> 
> I wonder about the relationship between the max attribute and the
> IfAccumulatedFileCount.
> 
> I had wrongly assumed that if you used the Delete policy, then the max
> attribute wasn't needed.
> But that resulted in having a cap on the number of log files to 7 (which is
> the DEFAULT_WINDOW_SIZE in DefaultRolloverStrategy)
> 
> In this example:
> https://logging.apache.org/log4j/2.x/manual/appenders.html#DefaultRolloverStrategy
> 
>  
>
>  
>
>  
>
>
>  
>
>  
>
>  
> 
> max is cleverly set to 100, when IfAccumulatedFileCount is set to 10.
> 
> Could we reasonably assume that max is not very useful here?
> 
> I'm thinking about setting it to the same value, or just setting max to a
> very high value (100).
> 
> Thoughts?

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



DefaultRolloverStrategy max attribute and IfAccumulatedFileCount

2016-10-18 Thread Benjamin Jaton
Hello,

I wonder about the relationship between the max attribute and the
IfAccumulatedFileCount.

I had wrongly assumed that if you used the Delete policy, then the max
attribute wasn't needed.
But that resulted in having a cap on the number of log files to 7 (which is
the DEFAULT_WINDOW_SIZE in DefaultRolloverStrategy)

In this example:
https://logging.apache.org/log4j/2.x/manual/appenders.html#DefaultRolloverStrategy

  

  

  


  

  

  

max is cleverly set to 100, when IfAccumulatedFileCount is set to 10.

Could we reasonably assume that max is not very useful here?

I'm thinking about setting it to the same value, or just setting max to a
very high value (100).

Thoughts?