Package ch.qos.logback.core.hook
Class DelayingShutdownHook
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.hook.ShutdownHookBase
ch.qos.logback.core.hook.DelayingShutdownHook
- All Implemented Interfaces:
ShutdownHook,ContextAware,Runnable
ShutdownHook implementation that stops the Logback context after a specified
delay. The default delay is 0 ms (zero).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DurationThe default is no delay before shutdown.private DurationThe delay in milliseconds before the ShutdownHook stops the logback contextFields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ch.qos.logback.core.hook.ShutdownHookBase
stopMethods 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
-
DEFAULT_DELAY
The default is no delay before shutdown. -
delay
The delay in milliseconds before the ShutdownHook stops the logback context
-
-
Constructor Details
-
DelayingShutdownHook
public DelayingShutdownHook()
-
-
Method Details
-
getDelay
-
setDelay
The duration to wait before shutting down the current logback context.- Parameters:
delay-
-
run
public void run()
-