Top Description Fields Constructors Methods
ch.qos.logback.classic.servlet

public Class LogbackServletContextListener

extends Object
implements ServletContextListener
Class Inheritance
All Implemented Interfaces
jakarta.servlet.ServletContextListener, java.util.EventListener
Imports
jakarta.servlet.ServletContextEvent, .ServletContextListener, org.slf4j.ILoggerFactory, .LoggerFactory, ch.qos.logback.classic.LoggerContext, ch.qos.logback.classic.util.StatusViaSLF4JLoggerFactory, ch.qos.logback.core.spi.ContextAwareBase

Allows for graceful shutdown of the LoggerContext associated with this web-app.
Author
Ceki Gulcu
Since
1.1.10

Field Summary

Modifier and TypeField and Description
pack-priv ContextAwareBase

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
contextDestroyed(ServletContextEvent
the ServletContextEvent containing the ServletContext that is being destroyed
sce
)

Overrides default jakarta.servlet.ServletContextListener.contextDestroyed.

Receives notification that the ServletContext is about to be shut down.
public void
contextInitialized(ServletContextEvent
the ServletContextEvent containing the ServletContext that is being initialized
sce
)

Overrides default jakarta.servlet.ServletContextListener.contextInitialized.

Receives notification that the web application initialization process is starting.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextAwareBaseback to summary
pack-priv ContextAwareBase contextAwareBase

Constructor Detail

LogbackServletContextListenerback to summary
public LogbackServletContextListener()

Method Detail

contextDestroyedback to summary
public void contextDestroyed(ServletContextEvent sce)

Overrides default jakarta.servlet.ServletContextListener.contextDestroyed.

Doc from jakarta.servlet.ServletContextListener.contextDestroyed.

Receives notification that the ServletContext is about to be shut down.

All servlets and filters will have been destroyed before any ServletContextListeners are notified of context destruction.

Parameters
sce:ServletContextEvent

the ServletContextEvent containing the ServletContext that is being destroyed

Annotations
@Override
contextInitializedback to summary
public void contextInitialized(ServletContextEvent sce)

Overrides default jakarta.servlet.ServletContextListener.contextInitialized.

Doc from jakarta.servlet.ServletContextListener.contextInitialized.

Receives notification that the web application initialization process is starting.

All ServletContextListeners are notified of context initialization before any filters or servlets in the web application are initialized.

Parameters
sce:ServletContextEvent

the ServletContextEvent containing the ServletContext that is being initialized

Annotations
@Override