org.apache.oozie.util
Class OozieRollingPolicy
java.lang.Object
org.apache.log4j.rolling.RollingPolicyBase
org.apache.oozie.util.OozieRollingPolicy
- All Implemented Interfaces:
- org.apache.log4j.rolling.RollingPolicy, org.apache.log4j.rolling.TriggeringPolicy, org.apache.log4j.spi.OptionHandler
public class OozieRollingPolicy
- extends org.apache.log4j.rolling.RollingPolicyBase
- implements org.apache.log4j.rolling.TriggeringPolicy
Has the same behavior as the TimeBasedRollingPolicy. Additionally, it will delete older logs (MaxHistory determines how many
older logs are retained).
Fields inherited from class org.apache.log4j.rolling.RollingPolicyBase |
activeFileName |
Methods inherited from class org.apache.log4j.rolling.RollingPolicyBase |
formatFileName, getActiveFileName, getDatePatternConverter, getFileNamePattern, getIntegerPatternConverter, parseFileNamePattern, setActiveFileName, setFileNamePattern |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OozieRollingPolicy
public OozieRollingPolicy()
getMaxHistory
public int getMaxHistory()
setMaxHistory
public void setMaxHistory(int maxHistory)
activateOptions
public void activateOptions()
- Specified by:
activateOptions
in interface org.apache.log4j.spi.OptionHandler
- Overrides:
activateOptions
in class org.apache.log4j.rolling.RollingPolicyBase
initialize
public org.apache.log4j.rolling.RolloverDescription initialize(String file,
boolean append)
throws SecurityException
- Specified by:
initialize
in interface org.apache.log4j.rolling.RollingPolicy
- Throws:
SecurityException
rollover
public org.apache.log4j.rolling.RolloverDescription rollover(String activeFile)
throws SecurityException
- Specified by:
rollover
in interface org.apache.log4j.rolling.RollingPolicy
- Throws:
SecurityException
isTriggeringEvent
public boolean isTriggeringEvent(org.apache.log4j.Appender appender,
org.apache.log4j.spi.LoggingEvent event,
String filename,
long fileLength)
- Specified by:
isTriggeringEvent
in interface org.apache.log4j.rolling.TriggeringPolicy
Copyright © 2013 Apache Software Foundation. All Rights Reserved.