logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Jaton <benjamin.ja...@gmail.com>
Subject DefaultRolloverStrategy max attribute and IfAccumulatedFileCount
Date Tue, 18 Oct 2016 18:03:02 GMT

I wonder about the relationship between the max attribute and the

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:

      <DefaultRolloverStrategy max="100">
        <Delete basePath="${baseDir}" maxDepth="2">
          <IfFileName glob="*/app-*.log.gz">
            <IfLastModified age="30d">
                <IfAccumulatedFileSize exceeds="100 GB" />
                <IfAccumulatedFileCount exceeds="10" />

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 (1000000).


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message