org.apache.logging.log4j.web
Class Log4jServletContainerInitializer

java.lang.Object
  extended by org.apache.logging.log4j.web.Log4jServletContainerInitializer
All Implemented Interfaces:
ServletContainerInitializer

public class Log4jServletContainerInitializer
extends Object
implements 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 Summary
Log4jServletContainerInitializer()
           
 
Method Summary
 void onStartup(Set<Class<?>> classes, 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(Set<Class<?>> classes,
                      ServletContext servletContext)
               throws ServletException
Specified by:
onStartup in interface ServletContainerInitializer
Throws:
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.