Package org.apache.log4j.rolling
package org.apache.log4j.rolling
Implements various file rolling policies.
The RollingFileAppender
class
serves as the linchpin of this package. Its behaviour is
controlled by two subcomponents of type RollingPolicy
and TriggeringPolicy
.
-
ClassDescriptionCompositeTriggeringPolicy determines if rolling should be triggered by evaluating the current event against a set of triggering policies.FilterBasedTriggeringPolicy determines if rolling should be triggered by evaluating the current message against a set of filters.When rolling over,
FixedWindowRollingPolicy
renames files according to a fixed window algorithm as described below.RollingFileAppender
extendsFileAppender
to backup the log files depending onRollingPolicy
andTriggeringPolicy
.Wrapper for OutputStream that will report all write operations back to this class for file length calculations.ARollingPolicy
specifies the actions taken on a logging file rollover.Implements methods common to most, it not all, rolling policies.Description of actions needed to complete rollover.Description of actions needed to complete rollover.SizeBasedTriggeringPolicy looks at size of the file being currently written to.TimeBasedRollingPolicy
is both easy to configure and quite powerful.ATriggeringPolicy
controls the conditions under which rollover occurs.