Class Log4jServletContainerInitializer

  • All Implemented Interfaces:
    jakarta.servlet.ServletContainerInitializer

    public class Log4jServletContainerInitializer
    extends java.lang.Object
    implements jakarta.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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onStartup​(java.util.Set<java.lang.Class<?>> classes, jakarta.servlet.ServletContext servletContext)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Log4jServletContainerInitializer

        public Log4jServletContainerInitializer()
    • Method Detail

      • onStartup

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