Yes, that’d be great. 7 seems to too low for frequently filled logs. And also guys, please document it. I am raising a JIRA ticket in this regards ( thanks Remko for the reminder). Also yes, I have set a default purge policy, this is 90 days in our use case.
Best, Chandra On 12 Apr 2017, 12:07 AM +0530, Ralph Goers <ralph.go...@dslextreme.com>, wrote: > I believe starting with 2.8.1 we no longer scan the directory so it is much > faster. We could probably raise the default limit. > > Ralph > > > On Apr 11, 2017, at 11:12 AM, Remko Popma <remko.po...@gmail.com> wrote: > > > > Sorry to hear that! > > > > You are right that the docs currently don't mention the default value for > > the max attribute. > > We should fix the docs. Can I ask you to raise a Jira for this? > > > > As for why not a large default value, there is a performance impact: all > > files within the range need to be renamed (bump version by one), and the > > current logic scans the directory to look for files that match the pattern. > > > > You may be interested in the custom Delete action which is more efficient ( > > https://logging.apache.org/log4j/2.x/manual/appenders.html#CustomDeleteOnRollover > > ). > > > > > > On Mon, Apr 10, 2017 at 2:50 PM, Chandra < > > chandra.tungathur...@rwth-aachen.de> wrote: > > > > > Hi guys, > > > > > > Something I noticed in my production, the maximum limit of index (i.e., > > > the max #files to be rolled before an overwrite occurs) is 7 by default. > > > This is not mentioned anywhere in any of the documentation. I was only > > > able to confirm this by actually looking into the source code [1]. > > > Unfortunately, by the time we noticed there was huge data loss. > > > > > > I wanted to confirm: > > > * Why is the default max index set to 7? I was naive to think that the > > > default max index would be set to a large value (may be no max index at > > > all, perhaps) > > > * Why wasn’t this mentioned anywhere in the documentation (if it is, can > > > you point me to it. may be I wasn’t paying attention). If it happened to > > > me, perhaps it might for others. > > > > > > > > > > > > Best, > > > Chandra > > > > > > > > > > > > [1] https://github.com/apache/logging-log4j2/blob/master/ > > > log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/ > > > DefaultRolloverStrategy.java#L126 > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org >