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 ARollingPolicy
specifies the actions taken on a logging file rollover.RolloverDescription Description of actions needed to complete rollover.TriggeringPolicy ATriggeringPolicy
controls 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,FixedWindowRollingPolicy
renames files according to a fixed window algorithm as described below.RollingFileAppender RollingFileAppender
extendsFileAppender
to backup the log files depending onRollingPolicy
andTriggeringPolicy
.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 TimeBasedRollingPolicy
is both easy to configure and quite powerful.