Class Log4jProvider
java.lang.Object
org.apache.logging.log4j.spi.Provider
org.apache.logging.log4j.core.impl.Log4jProvider
Binding for the Log4j API.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate static final Stringprivate static final StringConstant used to select a garbage-free implementation ofThreadContextMap.private static final Stringprivate static final Loggerprivate final Lazy<LoggerContextFactory> private static final StringConstant used to disable theThreadContextMap.private static final Stringprivate final Lazy<ThreadContextMap> private static final Stringprivate static final StringConstant used to select a web application-safe implementation ofThreadContextMap.Fields inherited from class org.apache.logging.log4j.spi.Provider
CURRENT_VERSION, FACTORY_PRIORITY, LOGGER_CONTEXT_FACTORY, PROVIDER_PROPERTY_NAME, THREAD_CONTEXT_MAP -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.logging.log4j.spi.Provider
equals, getClassName, getPriority, getThreadContextMap, getUrl, getVersions, hashCode, loadLoggerContextFactory, loadThreadContextMap, toString
-
Field Details
-
NO_OP_CONTEXT_MAP
Constant used to disable theThreadContextMap.Warning: the value of this constant does not point to a concrete class name.
- See Also:
-
WEB_APP_CONTEXT_MAP
Constant used to select a web application-safe implementation ofThreadContextMap.This implementation only binds JRE classes to
ThreadLocalvariables.Warning: the value of this constant does not point to a concrete class name.
- See Also:
-
GARBAGE_FREE_CONTEXT_MAP
Constant used to select a garbage-free implementation ofThreadContextMap.This implementation must ensure that common operations don't create new object instances. The drawback is the necessity to bind custom classes to
ThreadLocalvariables.Warning: the value of this constant does not point to a concrete class name.
- See Also:
-
DISABLE_CONTEXT_MAP
- See Also:
-
DISABLE_THREAD_CONTEXT
- See Also:
-
THREAD_CONTEXT_MAP_PROPERTY
- See Also:
-
GC_FREE_THREAD_CONTEXT_PROPERTY
- See Also:
-
WEB_APP_CLASS_NAME
- See Also:
-
GARBAGE_FREE_CLASS_NAME
- See Also:
-
LOGGER
-
loggerContextFactoryLazy
-
threadContextMapLazy
-
-
Constructor Details
-
Log4jProvider
public Log4jProvider()
-
-
Method Details
-
getLoggerContextFactory
- Overrides:
getLoggerContextFactoryin classProvider- Returns:
- The logger context factory to be used by
LogManager.
-
getThreadContextMapInstance
- Overrides:
getThreadContextMapInstancein classProvider- Returns:
- The thread context map to be used by
ThreadContext.
-
createThreadContextMap
-
resetThreadContextMap
void resetThreadContextMap()
-