|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.log4j.rolling.SizeBasedTriggeringPolicy
public final class SizeBasedTriggeringPolicy
SizeBasedTriggeringPolicy looks at size of the file being currently written to.
| Constructor Summary | |
|---|---|
SizeBasedTriggeringPolicy()
Constructs a new instance. |
|
SizeBasedTriggeringPolicy(long maxFileSize)
Constructs an new instance. |
|
| Method Summary | |
|---|---|
void |
activateOptions()
Prepares policy for use. |
long |
getMaxFileSize()
Gets rollover threshold size in bytes. |
boolean |
isTriggeringEvent(org.apache.log4j.Appender appender,
org.apache.log4j.spi.LoggingEvent event,
java.lang.String file,
long fileLength)
Determines if a rollover may be appropriate at this time. |
void |
setMaxFileSize(long l)
Sets rollover threshold size in bytes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SizeBasedTriggeringPolicy()
public SizeBasedTriggeringPolicy(long maxFileSize)
maxFileSize - rollover threshold size in bytes.| Method Detail |
|---|
public boolean isTriggeringEvent(org.apache.log4j.Appender appender,
org.apache.log4j.spi.LoggingEvent event,
java.lang.String file,
long fileLength)
isTriggeringEvent in interface TriggeringPolicyappender - A reference to the appender.event - A reference to the currently event.file - The filename for the currently active log file.fileLength - Length of the file in bytes.
public long getMaxFileSize()
public void setMaxFileSize(long l)
l - new value for rollover threshold size.public void activateOptions()
activateOptions in interface org.apache.log4j.spi.OptionHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2010 The Apache Software Foundation. Licensed under the Apache License, Version 2.0
Apache Extras Companion for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.