logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LOG4J2-267) FastRollingFileAppender doesn't work well with TimeBasedTriggeringPolicy
Date Sat, 22 Jun 2013 20:12:20 GMT

     [ https://issues.apache.org/jira/browse/LOG4J2-267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Neidhart updated LOG4J2-267:
-----------------------------------

    Attachment: LOG4J2-267.patch

The attached patch fixes the problem. In case the file was newly created (append=false), the
initial time for the rollover was set to 0 (= January 1, 1970). In that case the initial time
is set to the current time.
                
> FastRollingFileAppender doesn't work well with TimeBasedTriggeringPolicy
> ------------------------------------------------------------------------
>
>                 Key: LOG4J2-267
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-267
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.0-beta6
>         Environment: Win7 SP1 64bit + JDK 6u43 64bit
>            Reporter: ilynaf
>            Assignee: Remko Popma
>         Attachments: LOG4J2-267.patch
>
>
> The below configuration file doesn't deliver correct rollover. As soon as logging starts,
the log file is rolled over with this date "1970-01-01". The same configuration work fine
with RollingFile appender.
> <configuration>
>     <appenders>
>         <FastRollingFile name="LogFile" fileName="log/ui-selenium-tests.log" append="false"
>                            filePattern="log/ui-selenium-tests.%d{yyyy-MM-dd}.log">
>             <ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
>             <PatternLayout pattern="%d %p [%c.%M():%L] - %m%n"/>
>             <Policies>
>                 <TimeBasedTriggeringPolicy interval="1" modulate="true"/>
>             </Policies>
>             <DefaultRolloverStrategy/>
>         </FastRollingFile >
>     </appenders>
>     <loggers>
>         <root level="TRACE">
>             <appender-ref ref="LogFile"/>
>         </root>
>   </loggers>
> </configuratio

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message