org.apache.logging.log4j.core.javaee
Class ContextListener

java.lang.Object
  extended by org.apache.logging.log4j.core.javaee.ContextListener
All Implemented Interfaces:
EventListener, javax.servlet.ServletContextListener

public class ContextListener
extends Object
implements javax.servlet.ServletContextListener

Saves the LoggerContext into the ServletContext as an attribute.


Field Summary
static String LOG4J_CONTEXT_ATTRIBUTE
          The name of the attribute to use to store the LoggerContext into the ServletContext.
 
Constructor Summary
ContextListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent event)
           
 void contextInitialized(javax.servlet.ServletContextEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG4J_CONTEXT_ATTRIBUTE

public static final String LOG4J_CONTEXT_ATTRIBUTE
The name of the attribute to use to store the LoggerContext into the ServletContext.

See Also:
Constant Field Values
Constructor Detail

ContextListener

public ContextListener()
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-2012 Apache Software Foundation. All Rights Reserved.