Top Description Fields Constructors Methods
ch.qos.logback.core.hook

public Class DefaultShutdownHook

extends ShutdownHookBase
Class Inheritance
Imports
ch.qos.logback.core.util.Duration

ShutdownHook implementation that stops the Logback context after a specified delay. The default delay is 0 ms (zero).

Stopping the logback context

Author
Mike Reinhold

Field Summary

Modifier and TypeField and Description
public static final Duration
DEFAULT_DELAY

The default is no delay before shutdown.

private Duration
delay

The delay in milliseconds before the ShutdownHook stops the logback context

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Duration
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.
public void
setDelay(Duration delay)

The duration to wait before shutting down the current logback context.

Inherited from ch.qos.logback.core.hook.ShutdownHookBase:
stop

Field Detail

DEFAULT_DELAYback to summary
public static final Duration DEFAULT_DELAY

The default is no delay before shutdown.

delayback to summary
private Duration delay

The delay in milliseconds before the ShutdownHook stops the logback context

Constructor Detail

DefaultShutdownHookback to summary
public DefaultShutdownHook()

Method Detail

getDelayback to summary
public Duration getDelay()
runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

setDelayback to summary
public void setDelay(Duration delay)

The duration to wait before shutting down the current logback context.