org.apache.logging.log4j.web

Class Log4jServletContainerInitializer

  • java.lang.Object
    • org.apache.logging.log4j.web.Log4jServletContainerInitializer
  • All Implemented Interfaces:
    javax.servlet.ServletContainerInitializer


    public class Log4jServletContainerInitializer
    extends Object
    implements javax.servlet.ServletContainerInitializer
    In a Servlet 3.0 or newer environment, this initializer is responsible for starting up Log4j logging before anything else happens in application initialization. For consistency across all containers, if the effective Servlet major version of the application is less than 3.0, this initializer does nothing.
    • Constructor Detail

      • Log4jServletContainerInitializer

        public Log4jServletContainerInitializer()
    • Method Detail

      • onStartup

        public void onStartup(Set<Class<?>> classes,
                     javax.servlet.ServletContext servletContext)
                       throws javax.servlet.ServletException
        Specified by:
        onStartup in interface javax.servlet.ServletContainerInitializer
        Throws:
        javax.servlet.ServletException

Copyright © 1999-2015 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.