Hassan Kalaldeh created LOG4J2-820:
--------------------------------------

             Summary: Default interval unit in TimeBasedTriggeringPolicy
                 Key: LOG4J2-820
                 URL: https://issues.apache.org/jira/browse/LOG4J2-820
             Project: Log4j 2
          Issue Type: Bug
          Components: API
    Affects Versions: 2.0.2
            Reporter: Hassan Kalaldeh


I just found that default interval type if not given in 
TimeBasedTriggeringPolicy is day not hour while using RollingFileAppender.

here is appender I use:
<RollingFile name="DailyRollDfm" fileName="/logs/itms2/dfm.log" 
filePattern="/backup/%d{yyyy}/%d{MM}/%d{dd}/module-%d{yyyy-MM-dd}-%i.log.gz"
        append="true" immediateFlush="false">
      <PatternLayout>
        <Pattern>%d{ISO8601}: %-5p [%-8t] [%C{1}.%M():%L] - %m%n</Pattern>
      </PatternLayout>
      <Policies>
        <SizeBasedTriggeringPolicy size="2 GB" />
        <TimeBasedTriggeringPolicy interval="24" modulate="true" />
        <OnStartupTriggeringPolicy />
      </Policies>
          <DefaultRolloverStrategy max="100"/>
</RollingFile>

but the example in 
http://logging.apache.org/log4j/2.x/manual/appenders.html#RollingFileAppender 
assumes default is in hours not in days.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to