Package org.apache.logging.log4j.web
Class Log4jServletContextListener
java.lang.Object
org.apache.logging.log4j.web.Log4jServletContextListener
- All Implemented Interfaces:
jakarta.servlet.ServletContextListener,EventListener
public class Log4jServletContextListener
extends Object
implements jakarta.servlet.ServletContextListener
In environments older than Servlet 3.0, this initializer is responsible for starting up Log4j logging before anything
else happens in application initialization. In all environments, this shuts down Log4j after the application shuts
down.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextDestroyed(jakarta.servlet.ServletContextEvent event) voidcontextInitialized(jakarta.servlet.ServletContextEvent event)
-
Constructor Details
-
Log4jServletContextListener
public Log4jServletContextListener()
-
-
Method Details
-
contextInitialized
public void contextInitialized(jakarta.servlet.ServletContextEvent event) - Specified by:
contextInitializedin interfacejakarta.servlet.ServletContextListener
-
contextDestroyed
public void contextDestroyed(jakarta.servlet.ServletContextEvent event) - Specified by:
contextDestroyedin interfacejakarta.servlet.ServletContextListener
-