Package ch.qos.logback.core.rolling
Interface TimeBasedFileNamingAndTriggeringPolicy<E>
- Record Components:
date
-
- All Superinterfaces:
ContextAware
,LifeCycle
,TriggeringPolicy<E>
- All Known Implementing Classes:
DefaultTimeBasedFileNamingAndTriggeringPolicy
,SizeAndTimeBasedFNATP
,TimeBasedFileNamingAndTriggeringPolicyBase
@Deprecated(since="2022-01-27")
public interface TimeBasedFileNamingAndTriggeringPolicy<E>
extends TriggeringPolicy<E>, ContextAware
Deprecated.
Set some date in the current period. Only unit tests should invoke this
method.
WARNING: method removed. A unit test should not set the
date in current period. It is the job of the FNATP to compute that.
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Return the archive remover appropriate for this instance.Deprecated.Return the current periods file name without the compression suffix.long
Deprecated.Return the current time which is usually the value returned by System.currentMillis().Deprecated.Return the file name for the elapsed periods file name.void
setCurrentTime
(long now) Deprecated.Set the current time.void
Deprecated.Set the host/parentTimeBasedRollingPolicy
.Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
Methods inherited from interface ch.qos.logback.core.rolling.TriggeringPolicy
isTriggeringEvent
-
Method Details
-
setTimeBasedRollingPolicy
Deprecated.Set the host/parentTimeBasedRollingPolicy
.- Parameters:
tbrp
- parent TimeBasedRollingPolicy
-
getElapsedPeriodsFileName
String getElapsedPeriodsFileName()Deprecated.Return the file name for the elapsed periods file name.- Returns:
-
getCurrentPeriodsFileNameWithoutCompressionSuffix
String getCurrentPeriodsFileNameWithoutCompressionSuffix()Deprecated.Return the current periods file name without the compression suffix. This value is equivalent to the active file name.- Returns:
- current period's file name (without compression suffix)
-
getArchiveRemover
ArchiveRemover getArchiveRemover()Deprecated.Return the archive remover appropriate for this instance. -
getCurrentTime
long getCurrentTime()Deprecated.Return the current time which is usually the value returned by System.currentMillis(). However, for testing purposed this value may be different than the real time.- Returns:
- current time value
-
setCurrentTime
void setCurrentTime(long now) Deprecated.Set the current time. Only unit tests should invoke this method.- Parameters:
now
-
-