You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2019/07/29 04:41:00 UTC
[jira] [Commented] (LOG4J2-1073) RollingFileAppender working file
and archives have wrong date values
[ https://issues.apache.org/jira/browse/LOG4J2-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16894930#comment-16894930 ]
Ralph Goers commented on LOG4J2-1073:
-------------------------------------
[~ktaylor] Are you still having this issue with 2.12.0?
> RollingFileAppender working file and archives have wrong date values
> --------------------------------------------------------------------
>
> Key: LOG4J2-1073
> URL: https://issues.apache.org/jira/browse/LOG4J2-1073
> Project: Log4j 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.3
> Reporter: Ben Hess
> Assignee: Ralph Goers
> Priority: Major
>
> Suppose I have RollingFile appenders within a Route. Configuration below explanation - pretty typical, should rollover every day.
> Suppose today's date is Jul 2 2015, and the program has been running since Jun 30 2015.
> So for each Routed RollingFile I should have three files with entries having the correct dates:
> program-general.log - has entries from 7/2/2015 only
> program-general.2015-07-01.log - has entries from 7/1/2015 only
> program-general.2015-06-30.log - has entries from 6/30/2015 only
> Except what I have is the following:
> program-general.log - has entries from 6/30 - 7/02
> program-general.2015-07-01.log - has entries from 6/30 - 7/01
> program-general.2015-06-30.log - has entries from 6/30
> The relevant configuration:
> <Appenders>
> <RollingFile name="generalAppender" fileName="logs/program-general.log" filePattern="logs/program-general.%d{yyyy-MM-dd}.log">
> <PatternLayout pattern="%d [%t] %-5p %c{1} - %m%n %ex"/>
> <TimeBasedTriggeringPolicy interval="1" modulate="true"/>
> <DefaultRolloverStrategy max="7"/>
> </RollingFile>
> <Routing name="RoutingAppender">
> <Routes pattern="${ctx:propertyId}">
> <Route>
> <RollingFile name="Rolling-${ctx:propertyId}"
> fileName="logs/program-${ctx:propertyId}.log"
> filePattern="logs/program-${ctx:propertyId}.%d{yyyy-MM-dd}.log">
>
> <PatternLayout pattern="%d [%t] %-5p %c{1} - %m%ex%n"/>
> <TimeBasedTriggeringPolicy interval="1" modulate="true"/>
> <DefaultRolloverStrategy max="7"/>
> </RollingFile>
> </Route>
> <Route ref="generalAppender" key="${ctx:propertyId}"/>
> </Routes>
> </Routing>
> </Appenders>
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)