[
https://issues.apache.org/jira/browse/LOG4J2-573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13941833#comment-13941833
]
Ralph Goers commented on LOG4J2-573:
------------------------------------
Is May 1, 2014 12:45 more specific than May 1? It seems obvious to me that in
the first the most specific time unit is minutes while in the second it is a
day.
This enhancement introduces another complexity. Currently when the time-based
pattern is present the increment is reset to 0 when the rollover occurs due to
time. It only increments on a size based rollover. So without the file
pattern every rollover would try to write to file 0. So you are asking for
two enhancements in this request.
> TimeBasedTriggeringPolicy does not accept %i increment FilePattern
> ------------------------------------------------------------------
>
> Key: LOG4J2-573
> URL: https://issues.apache.org/jira/browse/LOG4J2-573
> Project: Log4j 2
> Issue Type: Improvement
> Components: Appenders
> Affects Versions: 2.0-rc1
> Reporter: Steven McCoy
> Priority: Minor
>
> The following configuration should be valid but raises an exception because
> the filePattern contains no date however it does contain an increment pattern.
> {code:xml}
> <RollingRandomAccessFile name="File" fileName="${filename}"
> filePattern="logs/icap.log-%i">
> <PatternLayout pattern="%m%n"/>
> <Policies>
> <OnStartupTriggeringPolicy />
> <TimeBasedTriggeringPolicy interval="12" modulate="true"/>
> <SizeBasedTriggeringPolicy size="500 MB"/>
> </Policies>
> <DefaultRolloverStrategy fileIndex="min" max="3"/>
> </RollingRandomAccessFile>
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]