[
https://issues.apache.org/jira/browse/SLING-7660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16479015#comment-16479015
]
Julian Sedding commented on SLING-7660:
---------------------------------------
[~chetanm] Thanks for your thoughts. I think the best option would indeed be to
refactor the code to
{{ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy}}. However, this
implies that the date would be part of the log filename, even if rotation is
configured to be only size-based.
IMHO that's not a big problem. Of course there may be scripts (e.g. backup,
analysis etc) out there that assume certain file names. On the other hand,
having the date in the filename helps identify relevant information during
analysis more quickly, especially if the FS mtime is lost due to copy/zip etc.
I'll see if I find the time to give it a shot soon.
> LogManager configuration "Number of Log Files" limited to 20
> ------------------------------------------------------------
>
> Key: SLING-7660
> URL: https://issues.apache.org/jira/browse/SLING-7660
> Project: Sling
> Issue Type: Improvement
> Components: Commons
> Affects Versions: Commons Log 5.1.6
> Reporter: Julian Sedding
> Assignee: Julian Sedding
> Priority: Minor
> Fix For: Commons Log 5.1.8
>
>
> The "Number of Log Files" configuration property for size-based log rotation
> is capped at 20 (or 21 including the current log file. This limitation comes
> from [logback's
> {{FixedWindowRollingPolicy}}|https://github.com/qos-ch/logback/blob/39c7ab9510c4f48ef3fcbef248aac380d3b58235/logback-core/src/main/java/ch/qos/logback/core/rolling/FixedWindowRollingPolicy.java#L47],
> but can be overridden in a subclass. I propose to override the
> {{FixedWindowRollingPolicy#getMaxWindowSize}} to return {{Integer.MAX_VALUE}}.
> cc [~chetanm]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)