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,
FixedWindowRollingPolicyrenames files according to a fixed window algorithm as described below.RollingFileAppenderextendsFileAppenderto backup the log files depending onRollingPolicyandTriggeringPolicy.Wrapper for OutputStream that will report all write operations back to this class for file length calculations.ARollingPolicyspecifies 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.TimeBasedRollingPolicyis both easy to configure and quite powerful.ATriggeringPolicycontrols the conditions under which rollover occurs.