Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Abandoned
-
2.3
-
None
-
None
Description
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
<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>