Package ch.qos.logback.core.rolling
Class SizeAndTimeBasedFNATP<E>
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicyBase<E>
ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP<E>
- All Implemented Interfaces:
TimeBasedFileNamingAndTriggeringPolicy<E>,TriggeringPolicy<E>,ContextAware,LifeCycle
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) int(package private) InvocationGate(package private) FileSize(package private) static String(package private) static String(package private) longprivate final SizeAndTimeBasedFNATP.UsageFields inherited from class ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicyBase
archiveRemover, artificialCurrentTime, dateInCurrentPeriod, elapsedPeriodsFileName, errorFree, nextCheck, rc, started, tbrpFields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescription(package private) voidcomputeCurrentPeriodsHighestCounterValue(String stemRegex) protected ArchiveRemoverReturn the current periods file name without the compression suffix.booleanisTriggeringEvent(File activeFile, E event) Should roll-over be triggered at this time?voidsetMaxFileSize(FileSize aMaxFileSize) voidstart()private booleanMethods inherited from class ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicyBase
computeNextCheck, getArchiveRemover, getCurrentTime, getElapsedPeriodsFileName, isErrorFree, isStarted, setCurrentTime, setDateInCurrentPeriod, setDateInCurrentPeriod, setTimeBasedRollingPolicy, stop, withErrorsMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
Field Details
-
currentPeriodsCounter
int currentPeriodsCounter -
maxFileSize
FileSize maxFileSize -
nextSizeCheck
long nextSizeCheck -
MISSING_INT_TOKEN
-
MISSING_DATE_TOKEN
-
usage
-
invocationGate
InvocationGate invocationGate
-
-
Constructor Details
-
SizeAndTimeBasedFNATP
public SizeAndTimeBasedFNATP() -
SizeAndTimeBasedFNATP
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceLifeCycle- Overrides:
startin classTimeBasedFileNamingAndTriggeringPolicyBase<E>
-
validateDateAndIntegerTokens
private boolean validateDateAndIntegerTokens() -
createArchiveRemover
-
computeCurrentPeriodsHighestCounterValue
-
isTriggeringEvent
Description copied from interface:TriggeringPolicyShould 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.
-
getCurrentPeriodsFileNameWithoutCompressionSuffix
Description copied from interface:TimeBasedFileNamingAndTriggeringPolicyReturn the current periods file name without the compression suffix. This value is equivalent to the active file name.- Specified by:
getCurrentPeriodsFileNameWithoutCompressionSuffixin interfaceTimeBasedFileNamingAndTriggeringPolicy<E>- Overrides:
getCurrentPeriodsFileNameWithoutCompressionSuffixin classTimeBasedFileNamingAndTriggeringPolicyBase<E>- Returns:
- current period's file name (without compression suffix)
-
setMaxFileSize
-