Package org.apache.logging.log4j.web
Interface Log4jWebLifeCycle
-
- All Superinterfaces:
LifeCycle
,Log4jWebSupport
- All Known Implementing Classes:
Log4jWebInitializerImpl
interface Log4jWebLifeCycle extends Log4jWebSupport, LifeCycle
Specifies an interface for initializing and deinitializing Log4j in a Java EE web application. The default and only implementation isLog4jWebInitializerImpl
. 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 org.apache.logging.log4j.core.LifeCycle
LifeCycle.State
-
-
Field Summary
-
Fields inherited from interface org.apache.logging.log4j.web.Log4jWebSupport
CONTEXT_ATTRIBUTE, IS_LOG4J_AUTO_INITIALIZATION_DISABLED, IS_LOG4J_AUTO_SHUTDOWN_DISABLED, IS_LOG4J_CONTEXT_SELECTOR_NAMED, LOG4J_CONFIG_LOCATION, LOG4J_CONTEXT_NAME, SUPPORT_ATTRIBUTE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
start()
Starts up Log4j in the web application.void
stop()
Shuts down Log4j in the web application.-
Methods inherited from interface org.apache.logging.log4j.core.LifeCycle
getState, initialize, isStarted, isStopped
-
Methods inherited from interface org.apache.logging.log4j.web.Log4jWebSupport
clearLoggerContext, setLoggerContext, wrapExecution
-
-
-
-
Method Detail
-
start
void start()
Starts up Log4j in the web application. CallsLog4jWebSupport.setLoggerContext()
after initialization is complete.
-
stop
void stop()
Shuts down Log4j in the web application. CallsLog4jWebSupport.clearLoggerContext()
immediately before deinitialization begins.
-
-