@Plugin(name="OnStartupTriggeringPolicy", category="Core", printObject=true) public class OnStartupTriggeringPolicy extends AbstractTriggeringPolicy
LifeCycle.State
Modifier and Type | Field and Description |
---|---|
private static long |
JVM_START_TIME |
private long |
minSize |
DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGER
Modifier | Constructor and Description |
---|---|
private |
OnStartupTriggeringPolicy(long minSize) |
Modifier and Type | Method and Description |
---|---|
static OnStartupTriggeringPolicy |
createPolicy(long minSize) |
void |
initialize(RollingFileManager manager)
Provide the RollingFileManager to the policy.
|
private static long |
initStartTime()
Returns the result of
ManagementFactory.getRuntimeMXBean().getStartTime() ,
or the current system time if JMX is not available. |
boolean |
isTriggeringEvent(LogEvent event)
Determine if a rollover should be triggered.
|
java.lang.String |
toString() |
equalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, start, stop, stop, stop
private static final long JVM_START_TIME
private final long minSize
private static long initStartTime()
ManagementFactory.getRuntimeMXBean().getStartTime()
,
or the current system time if JMX is not available.public void initialize(RollingFileManager manager)
manager
- The RollingFileManager.public boolean isTriggeringEvent(LogEvent event)
event
- A reference to the current event.public java.lang.String toString()
toString
in class java.lang.Object
@PluginFactory public static OnStartupTriggeringPolicy createPolicy(@PluginAttribute(value="minSize",defaultLong=1L) long minSize)