Hi Simon,
> Not sure whether this helps you or not, but the TimeAndSizeRollingAppender
> has a RollOnStartup switch....
I ended up using "DateRollEnforced" which works well since we restart
some time after midnight:
<appender name="DailyFileLog"
class="org.apache.log4j.appender.TimeAndSizeRollingAppender">
<param name="file" value="${system.logdir}/nolij.log"/>
<param name="DateRollEnforced" value="true"/>
<param name="DatePattern" value=".yyyy-MM-dd"/>
<param name="MaxFileSize" value="200MB"/>
<param name="MaxRollFileCount" value="35"/>
<!-- -UAlbany ScavengeInterval 5 min (in milliseconds) -->
<param name="ScavengeInterval" value="300000"/>
<param name="BufferedIO" value="false"/>
<param name="CompressionAlgorithm" value="GZ"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n"/>
</layout>
</appender>
Implementation simply involved including your jar in place of
"apache-log4j-extras-1.0.jar",
and swapping our previous appender config. with one of your examples
(appropiately configured for our environment).
The other added benefit is the scavenge option.
This places control over removal of rotated application log files into
the hands of the application team.
Thank you very much,
-Ryan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]