java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.classic.turbo.TurboFilter
ch.qos.logback.classic.turbo.ReconfigureOnChangeFilter
- All Implemented Interfaces:
ContextAware
,LifeCycle
Reconfigure a LoggerContext when the configuration file changes.
- Author:
- Ceki Gulcu
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
Scan for changes in configuration file once every minute.protected long
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
changeDetected
(long now) decide
(org.slf4j.Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) Make a decision based on the multiple parameters passed as arguments.long
void
setRefreshPeriod
(long refreshPeriod) void
start()
toString()
Methods inherited from class ch.qos.logback.classic.turbo.TurboFilter
getName, isStarted, setName, stop
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Field Details
-
DEFAULT_REFRESH_PERIOD
Scan for changes in configuration file once every minute.- See Also:
-
nextCheck
-
-
Constructor Details
-
ReconfigureOnChangeFilter
public ReconfigureOnChangeFilter()
-
-
Method Details
-
start
- Specified by:
start
in interfaceLifeCycle
- Overrides:
start
in classTurboFilter
-
toString
-
decide
public FilterReply decide(org.slf4j.Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) Description copied from class:TurboFilter
Make a decision based on the multiple parameters passed as arguments. The returned value should be one of
,FilterReply.DENY
, orFilterReply.NEUTRAL
.FilterReply.ACCEPT
- Specified by:
decide
in classTurboFilter
- Parameters:
marker
-logger
-level
-format
-params
-t
-- Returns:
-
changeDetected
-
getRefreshPeriod
-
setRefreshPeriod
-