Interface Log4jWebLifeCycle
- All Superinterfaces:
LifeCycle, Log4jWebSupport
- All Known Implementing Classes:
Log4jWebInitializerImpl
Specifies an interface for initializing and deinitializing Log4j in a Java EE web application. The default and only
implementation is
Log4jWebInitializerImpl. The initializer is based on an interface to improve testability.
The methods here are contained in a package-private sub-interface because general application code should not have
access to them.-
Nested Class Summary
Nested classes/interfaces inherited from interface LifeCycle
LifeCycle.State -
Field Summary
-
Method Summary
Methods inherited from interface LifeCycle
getState, initialize, isStarted, isStoppedMethods inherited from interface Log4jWebSupport
clearLoggerContext, setLoggerContext, wrapExecution
-
Method Details
-
start
void start()Starts up Log4j in the web application. CallsLog4jWebSupport.setLoggerContext()after initialization is complete.- Specified by:
startin interfaceLifeCycle- Throws:
IllegalStateException- if a JNDI config location is specified but no name is specified.
-
stop
void stop()Shuts down Log4j in the web application. CallsLog4jWebSupport.clearLoggerContext()immediately before deinitialization begins.
-