net.sourceforge.hiveutils.web.logging
Class LoggingInitListener
java.lang.Object
net.sourceforge.hiveutils.web.logging.LoggingInitListener
- All Implemented Interfaces:
- java.util.EventListener, javax.servlet.ServletContextListener
public class LoggingInitListener
- extends java.lang.Object
- implements javax.servlet.ServletContextListener
ServletContextListener that will initialize log4j at web appalication start.
It must be setup in web.xml as <listener>.
Following parameters are given as <context-param> in web.xml:
config.logging defines the path to log4j configuration
file
config.logging.dir defines the path to where log files
should be written. That path will set the logdir property
that can be used in log4j configuration file
Please note that currently only xml configuration files are supported.
- Author:
- Jean-Francois Poilpret
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoggingInitListener
public LoggingInitListener()
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent evt)
- Specified by:
contextInitialized in interface javax.servlet.ServletContextListener
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent evt)
- Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener