|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.logging.log4j.core.appender.rolling.SizeBasedTriggeringPolicy
@Plugin(name="SizeBasedTriggeringPolicy", category="Core", printObject=true) public class SizeBasedTriggeringPolicy
Field Summary | |
---|---|
protected static org.apache.logging.log4j.Logger |
LOGGER
Allow subclasses access to the status logger without creating another instance. |
Constructor Summary | |
---|---|
protected |
SizeBasedTriggeringPolicy()
Constructs a new instance. |
protected |
SizeBasedTriggeringPolicy(long maxFileSize)
Constructs a new instance. |
Method Summary | |
---|---|
static SizeBasedTriggeringPolicy |
createPolicy(String size)
Create a SizeBasedTriggeringPolicy. |
void |
initialize(RollingFileManager manager)
Initialize the TriggeringPolicy. |
boolean |
isTriggeringEvent(LogEvent event)
Returns true if a rollover should occur. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.logging.log4j.Logger LOGGER
Constructor Detail |
---|
protected SizeBasedTriggeringPolicy()
protected SizeBasedTriggeringPolicy(long maxFileSize)
maxFileSize
- rollover threshold size in bytes.Method Detail |
---|
public void initialize(RollingFileManager manager)
initialize
in interface TriggeringPolicy
manager
- The RollingFileManager.public boolean isTriggeringEvent(LogEvent event)
isTriggeringEvent
in interface TriggeringPolicy
event
- A reference to the currently event.
public String toString()
toString
in class Object
@PluginFactory public static SizeBasedTriggeringPolicy createPolicy(@PluginAttribute(value="size") String size)
size
- The size of the file before rollover is required.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2015 Apache Software Foundation. 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.