Package | Description |
---|---|
org.apache.logging.log4j.core |
Implementation of Log4j 2.
|
org.apache.logging.log4j.core.async |
Provides Asynchronous Logger classes and interfaces for low-latency logging.
|
org.apache.logging.log4j.core.config |
Configuration of Log4j 2.
|
org.apache.logging.log4j.core.impl |
Log4j 2 private implementation classes.
|
org.apache.logging.log4j.core.jmx |
Log4j 2 JMX support.
|
org.apache.logging.log4j.core.osgi |
Collection of OSGi-specific classes for bundles.
|
org.apache.logging.log4j.core.selector |
Log4j 2 Context Selectors.
|
Modifier and Type | Method and Description |
---|---|
LoggerContext |
Logger.getContext()
Returns the LoggerContext this Logger is associated with.
|
Modifier and Type | Method and Description |
---|---|
protected Logger |
LoggerContext.newInstance(LoggerContext ctx,
String name,
org.apache.logging.log4j.message.MessageFactory messageFactory) |
Constructor and Description |
---|
Logger(LoggerContext context,
String name,
org.apache.logging.log4j.message.MessageFactory messageFactory)
The constructor.
|
Modifier and Type | Class and Description |
---|---|
class |
AsyncLoggerContext
LoggerContext that creates AsyncLogger objects. |
Modifier and Type | Method and Description |
---|---|
LoggerContext |
AsyncLoggerContextSelector.getContext(String fqcn,
ClassLoader loader,
boolean currentContext) |
LoggerContext |
AsyncLoggerContextSelector.getContext(String fqcn,
ClassLoader loader,
boolean currentContext,
URI configLocation) |
Modifier and Type | Method and Description |
---|---|
List<LoggerContext> |
AsyncLoggerContextSelector.getLoggerContexts() |
Modifier and Type | Method and Description |
---|---|
protected Logger |
AsyncLoggerContext.newInstance(LoggerContext ctx,
String name,
org.apache.logging.log4j.message.MessageFactory messageFactory) |
void |
AsyncLoggerContextSelector.removeContext(LoggerContext context) |
Constructor and Description |
---|
AsyncLogger(LoggerContext context,
String name,
org.apache.logging.log4j.message.MessageFactory messageFactory)
Constructs an
AsyncLogger with the specified context, name and
message factory. |
Modifier and Type | Method and Description |
---|---|
static LoggerContext |
Configurator.initialize(ClassLoader loader,
ConfigurationSource source)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(ClassLoader loader,
ConfigurationSource source,
Object externalContext)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(String name,
ClassLoader loader,
String configLocation)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(String name,
ClassLoader loader,
String configLocation,
Object externalContext)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(String name,
ClassLoader loader,
URI configLocation)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(String name,
ClassLoader loader,
URI configLocation,
Object externalContext)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(String name,
String configLocation)
Initializes the Logging Context.
|
Modifier and Type | Method and Description |
---|---|
static void |
Configurator.shutdown(LoggerContext ctx)
Shuts down the given logging context.
|
Modifier and Type | Field and Description |
---|---|
static ThreadLocal<LoggerContext> |
ContextAnchor.THREAD_CONTEXT
Anchor for the LoggerContext for the current Thread.
|
Modifier and Type | Method and Description |
---|---|
LoggerContext |
Log4jContextFactory.getContext(String fqcn,
ClassLoader loader,
Object externalContext,
boolean currentContext)
Loads the LoggerContext using the ContextSelector.
|
LoggerContext |
Log4jContextFactory.getContext(String fqcn,
ClassLoader loader,
Object externalContext,
boolean currentContext,
ConfigurationSource source)
Loads the LoggerContext using the ContextSelector.
|
LoggerContext |
Log4jContextFactory.getContext(String fqcn,
ClassLoader loader,
Object externalContext,
boolean currentContext,
URI configLocation,
String name)
Loads the LoggerContext using the ContextSelector.
|
Constructor and Description |
---|
LoggerConfigAdmin(LoggerContext loggerContext,
LoggerConfig loggerConfig)
Constructs a new
LoggerConfigAdmin with the specified LoggerContext
and logger config. |
LoggerContextAdmin(LoggerContext loggerContext,
Executor executor)
Constructs a new
LoggerContextAdmin with the Executor to be used for sending Notification
s asynchronously to listeners. |
Modifier and Type | Method and Description |
---|---|
LoggerContext |
BundleContextSelector.getContext(String fqcn,
ClassLoader loader,
boolean currentContext,
URI configLocation) |
Modifier and Type | Field and Description |
---|---|
protected static ConcurrentMap<String,AtomicReference<WeakReference<LoggerContext>>> |
ClassLoaderContextSelector.CONTEXT_MAP |
Modifier and Type | Method and Description |
---|---|
LoggerContext |
ContextSelector.getContext(String fqcn,
ClassLoader loader,
boolean currentContext)
Returns the LoggerContext.
|
LoggerContext |
JndiContextSelector.getContext(String fqcn,
ClassLoader loader,
boolean currentContext) |
LoggerContext |
BasicContextSelector.getContext(String fqcn,
ClassLoader loader,
boolean currentContext) |
LoggerContext |
ClassLoaderContextSelector.getContext(String fqcn,
ClassLoader loader,
boolean currentContext) |
LoggerContext |
ContextSelector.getContext(String fqcn,
ClassLoader loader,
boolean currentContext,
URI configLocation)
Returns the LoggerContext.
|
LoggerContext |
JndiContextSelector.getContext(String fqcn,
ClassLoader loader,
boolean currentContext,
URI configLocation) |
LoggerContext |
BasicContextSelector.getContext(String fqcn,
ClassLoader loader,
boolean currentContext,
URI configLocation) |
LoggerContext |
ClassLoaderContextSelector.getContext(String fqcn,
ClassLoader loader,
boolean currentContext,
URI configLocation) |
protected LoggerContext |
ClassLoaderContextSelector.getDefault() |
LoggerContext |
JndiContextSelector.locateContext(String name,
Object externalContext,
URI configLocation) |
LoggerContext |
NamedContextSelector.locateContext(String name,
Object externalContext,
URI configLocation)
Locate the LoggerContext with the specified name.
|
LoggerContext |
BasicContextSelector.locateContext(String name,
String configLocation) |
LoggerContext |
JndiContextSelector.removeContext(String name) |
LoggerContext |
NamedContextSelector.removeContext(String name)
Locate the LoggerContext with the specified name using the default configuration.
|
Modifier and Type | Method and Description |
---|---|
List<LoggerContext> |
ContextSelector.getLoggerContexts()
Returns a List of all the available LoggerContexts.
|
List<LoggerContext> |
JndiContextSelector.getLoggerContexts() |
List<LoggerContext> |
BasicContextSelector.getLoggerContexts() |
List<LoggerContext> |
ClassLoaderContextSelector.getLoggerContexts() |
Modifier and Type | Method and Description |
---|---|
void |
ContextSelector.removeContext(LoggerContext context)
Remove any references to the LoggerContext.
|
void |
JndiContextSelector.removeContext(LoggerContext context) |
void |
BasicContextSelector.removeContext(LoggerContext context) |
void |
ClassLoaderContextSelector.removeContext(LoggerContext context) |
Copyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.