TriggeringPolicy, LifeCycle, LifeCycle2@Plugin(name="SizeBasedTriggeringPolicy", category="Core", printObject=true) public class SizeBasedTriggeringPolicy extends AbstractTriggeringPolicy
LifeCycle.StateDEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGER| Modifier | Constructor | Description |
|---|---|---|
protected |
SizeBasedTriggeringPolicy() |
Constructs a new instance.
|
protected |
SizeBasedTriggeringPolicy(long maxFileSize) |
Constructs a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
static SizeBasedTriggeringPolicy |
createPolicy(String size) |
Create a SizeBasedTriggeringPolicy.
|
long |
getMaxFileSize() |
|
void |
initialize(RollingFileManager aManager) |
Initialize the TriggeringPolicy.
|
boolean |
isTriggeringEvent(LogEvent event) |
Returns true if a rollover should occur.
|
String |
toString() |
equalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, start, stop, stop, stopprotected SizeBasedTriggeringPolicy()
protected SizeBasedTriggeringPolicy(long maxFileSize)
maxFileSize - rollover threshold size in bytes.public long getMaxFileSize()
public void initialize(RollingFileManager aManager)
aManager - The RollingFileManager.public boolean isTriggeringEvent(LogEvent event)
event - A reference to the currently event.@PluginFactory public static SizeBasedTriggeringPolicy createPolicy(@PluginAttribute("size") String size)
size - The size of the file before rollover is required.Copyright © 1999-2018. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.