org.apache.logging.log4j.web

Class Log4jServletContextListener

  • All Implemented Interfaces:
    EventListener, javax.servlet.ServletContextListener


    public class Log4jServletContextListener
    extends Object
    implements javax.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 Detail

      • Log4jServletContextListener

        public Log4jServletContextListener()
    • Method Detail

      • contextInitialized

        public void contextInitialized(javax.servlet.ServletContextEvent event)
        Specified by:
        contextInitialized in interface javax.servlet.ServletContextListener
      • contextDestroyed

        public void contextDestroyed(javax.servlet.ServletContextEvent event)
        Specified by:
        contextDestroyed in interface javax.servlet.ServletContextListener

Copyright © 1999-1969 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.