Class AsyncLoggerContextSelector
java.lang.Object
org.apache.logging.log4j.core.selector.ClassLoaderContextSelector
org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
- All Implemented Interfaces:
ContextSelector
,LoggerContextShutdownAware
ContextSelector
that manages AsyncLoggerContext
instances.
As of version 2.5, this class extends ClassLoaderContextSelector for better web app support.
-
Field Summary
Fields inherited from class org.apache.logging.log4j.core.selector.ClassLoaderContextSelector
CONTEXT_MAP, LOGGER
Fields inherited from interface org.apache.logging.log4j.core.selector.ContextSelector
DEFAULT_STOP_TIMEOUT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected LoggerContext
createContext
(String name, URI configLocation) protected String
static boolean
Returnstrue
if the user specified this selector as the Log4jContextSelector, to make all loggers asynchronous.protected String
toContextMapKey
(ClassLoader loader) Methods inherited from class org.apache.logging.log4j.core.selector.ClassLoaderContextSelector
contextShutdown, getContext, getContext, getContext, getDefault, getLoggerContexts, hasContext, isClassLoaderDependent, removeContext, shutdown
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.logging.log4j.core.selector.ContextSelector
getContext
-
Constructor Details
-
AsyncLoggerContextSelector
public AsyncLoggerContextSelector()
-
-
Method Details
-
isSelected
public static boolean isSelected()Returnstrue
if the user specified this selector as the Log4jContextSelector, to make all loggers asynchronous.- Returns:
true
if all loggers are asynchronous,false
otherwise.
-
createContext
- Overrides:
createContext
in classClassLoaderContextSelector
-
toContextMapKey
- Overrides:
toContextMapKey
in classClassLoaderContextSelector
-
defaultContextName
- Overrides:
defaultContextName
in classClassLoaderContextSelector
-