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.
-
Interface Summary Interface Description RollingPolicy ARollingPolicyspecifies the actions taken on a logging file rollover.RolloverDescription Description of actions needed to complete rollover.TriggeringPolicy ATriggeringPolicycontrols the conditions under which rollover occurs. -
Class Summary Class Description CompositeTriggeringPolicy CompositeTriggeringPolicy determines if rolling should be triggered by evaluating the current event against a set of triggering policies.FilterBasedTriggeringPolicy FilterBasedTriggeringPolicy determines if rolling should be triggered by evaluating the current message against a set of filters.FixedWindowRollingPolicy When rolling over,FixedWindowRollingPolicyrenames files according to a fixed window algorithm as described below.RollingFileAppender RollingFileAppenderextendsFileAppenderto backup the log files depending onRollingPolicyandTriggeringPolicy.RollingFileAppender.CountingOutputStream Wrapper for OutputStream that will report all write operations back to this class for file length calculations.RollingFileAppender.DefaultErrorHandler RollingPolicyBase Implements methods common to most, it not all, rolling policies.RolloverDescriptionImpl Description of actions needed to complete rollover.SizeBasedTriggeringPolicy SizeBasedTriggeringPolicy looks at size of the file being currently written to.TimeBasedRollingPolicy TimeBasedRollingPolicyis both easy to configure and quite powerful.