ch.qos.logback.core.rolling
Class SizeBasedTriggeringPolicy
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.rolling.TriggeringPolicyBase
ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy
- All Implemented Interfaces:
- TriggeringPolicy, ContextAware, LifeCycle
public class SizeBasedTriggeringPolicy
- extends TriggeringPolicyBase
SizeBasedTriggeringPolicy looks at size of the file being
currently written to. If it grows bigger than the specified size,
the FileAppender using the SizeBasedTriggeringPolicy rolls the file
and creates a new one.
For more information about this policy, please refer to the online manual at
http://logback.qos.ch/manual/appenders.html#SizeBasedTriggeringPolicy
- Author:
- Ceki Gülcü
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SEE_SIZE_FORMAT
public static final String SEE_SIZE_FORMAT
- See Also:
- Constant Field Values
DEFAULT_MAX_FILE_SIZE
public static final long DEFAULT_MAX_FILE_SIZE
- The default maximum file size.
- See Also:
- Constant Field Values
SizeBasedTriggeringPolicy
public SizeBasedTriggeringPolicy()
SizeBasedTriggeringPolicy
public SizeBasedTriggeringPolicy(String maxFileSize)
isTriggeringEvent
public boolean isTriggeringEvent(File activeFile,
Object event)
- Description copied from interface:
TriggeringPolicy
- Should roll-over be triggered at this time?
- Parameters:
activeFile
- A reference to the currently active log file.event
- A reference to the currently event.
- Returns:
- true if a roll-over should occur.
getMaxFileSize
public String getMaxFileSize()
setMaxFileSize
public void setMaxFileSize(String maxFileSize)
Copyright © 2005-2008 QOS.ch. All Rights Reserved.