Package | Description |
---|---|
org.apache.logging.log4j.core |
Implementation of Log4j 2.
|
org.apache.logging.log4j.core.appender |
Log4j 2 Appenders.
|
org.apache.logging.log4j.core.appender.mom.kafka |
Classes and interfaces for Kafka appender support.
|
org.apache.logging.log4j.core.appender.rolling |
Rolling File Appender and support classes.
|
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.config.builder.api |
Configuration Builder API for programmatically configuring Log4j.
|
org.apache.logging.log4j.core.config.builder.impl |
Configuration Builder Implementation.
|
org.apache.logging.log4j.core.config.json |
Classes and interfaces supporting configuration of Log4j 2 with JSON.
|
org.apache.logging.log4j.core.config.properties |
Configuration using Properties files.
|
org.apache.logging.log4j.core.config.xml |
Classes and interfaces supporting configuration of Log4j 2 with XML.
|
org.apache.logging.log4j.core.config.yaml |
Classes and interfaces supporting configuration of Log4j 2 with YAML.
|
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.lookup |
Log4j 2 Lookups.
|
org.apache.logging.log4j.core.net |
Log4j 2 network 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 |
---|---|
static LoggerContext |
LoggerContext.getContext()
Returns the current LoggerContext.
|
LoggerContext |
Logger.getContext()
Returns the LoggerContext this Logger is associated with.
|
static LoggerContext |
LoggerContext.getContext(boolean currentContext)
Returns a LoggerContext.
|
static LoggerContext |
LoggerContext.getContext(ClassLoader loader,
boolean currentContext,
URI configLocation)
Returns a LoggerContext.
|
LoggerContext |
LoggerContextAccessor.getLoggerContext() |
LoggerContext |
DefaultLoggerContextAccessor.getLoggerContext() |
Modifier and Type | Method and Description |
---|---|
protected Logger |
LoggerContext.newInstance(LoggerContext ctx,
String name,
MessageFactory messageFactory) |
Constructor and Description |
---|
Logger(LoggerContext context,
String name,
MessageFactory messageFactory)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
LoggerContext |
ConfigurationFactoryData.getLoggerContext()
Gets the LoggerContext from the Configuration or null.
|
LoggerContext |
AbstractManager.getLoggerContext()
Gets the logger context used to create this instance or null.
|
Constructor and Description |
---|
AbstractManager(LoggerContext loggerContext,
String name) |
FileManager(LoggerContext loggerContext,
String fileName,
OutputStream os,
boolean append,
boolean locking,
boolean createOnDemand,
String advertiseURI,
Layout<? extends Serializable> layout,
boolean writeHeader,
ByteBuffer buffer)
Deprecated.
|
FileManager(LoggerContext loggerContext,
String fileName,
OutputStream os,
boolean append,
boolean locking,
boolean createOnDemand,
String advertiseURI,
Layout<? extends Serializable> layout,
String filePermissions,
String fileOwner,
String fileGroup,
boolean writeHeader,
ByteBuffer buffer) |
HttpManager(Configuration configuration,
LoggerContext loggerContext,
String name) |
HttpURLConnectionManager(Configuration configuration,
LoggerContext loggerContext,
String name,
URL url,
String method,
int connectTimeoutMillis,
int readTimeoutMillis,
Property[] headers,
SslConfiguration sslConfiguration,
boolean verifyHostname) |
OutputStreamManager(LoggerContext loggerContext,
OutputStream os,
String streamName,
boolean createOnDemand,
Layout<? extends Serializable> layout,
boolean writeHeader,
ByteBuffer byteBuffer) |
RandomAccessFileManager(LoggerContext loggerContext,
RandomAccessFile file,
String fileName,
OutputStream os,
int bufferSize,
String advertiseURI,
Layout<? extends Serializable> layout,
boolean writeHeader) |
Modifier and Type | Method and Description |
---|---|
static KafkaManager |
KafkaManager.getManager(LoggerContext loggerContext,
String name,
String topic,
boolean syncSend,
Property[] properties,
String key)
Deprecated.
|
Constructor and Description |
---|
KafkaManager(LoggerContext loggerContext,
String name,
String topic,
boolean syncSend,
Property[] properties,
String key) |
Constructor and Description |
---|
RollingFileManager(LoggerContext loggerContext,
String fileName,
String pattern,
OutputStream os,
boolean append,
boolean createOnDemand,
long size,
long initialTime,
TriggeringPolicy triggeringPolicy,
RolloverStrategy rolloverStrategy,
String advertiseURI,
Layout<? extends Serializable> layout,
boolean writeHeader,
ByteBuffer buffer)
Deprecated.
|
RollingFileManager(LoggerContext loggerContext,
String fileName,
String pattern,
OutputStream os,
boolean append,
boolean createOnDemand,
long size,
long initialTime,
TriggeringPolicy triggeringPolicy,
RolloverStrategy rolloverStrategy,
String advertiseURI,
Layout<? extends Serializable> layout,
String filePermissions,
String fileOwner,
String fileGroup,
boolean writeHeader,
ByteBuffer buffer) |
RollingRandomAccessFileManager(LoggerContext loggerContext,
RandomAccessFile raf,
String fileName,
String pattern,
OutputStream os,
boolean append,
boolean immediateFlush,
int bufferSize,
long size,
long time,
TriggeringPolicy policy,
RolloverStrategy strategy,
String advertiseURI,
Layout<? extends Serializable> layout,
boolean writeHeader)
Deprecated.
|
RollingRandomAccessFileManager(LoggerContext loggerContext,
RandomAccessFile raf,
String fileName,
String pattern,
OutputStream os,
boolean append,
boolean immediateFlush,
int bufferSize,
long size,
long initialTime,
TriggeringPolicy policy,
RolloverStrategy strategy,
String advertiseURI,
Layout<? extends Serializable> layout,
String filePermissions,
String fileOwner,
String fileGroup,
boolean writeHeader) |
Modifier and Type | Class and Description |
---|---|
class |
AsyncLoggerContext
LoggerContext that creates AsyncLogger objects. |
Modifier and Type | Method and Description |
---|---|
protected LoggerContext |
AsyncLoggerContextSelector.createContext(String name,
URI configLocation) |
LoggerContext |
BasicAsyncLoggerContextSelector.getContext(String fqcn,
ClassLoader loader,
boolean currentContext) |
LoggerContext |
BasicAsyncLoggerContextSelector.getContext(String fqcn,
ClassLoader loader,
boolean currentContext,
URI configLocation) |
Modifier and Type | Method and Description |
---|---|
List<LoggerContext> |
BasicAsyncLoggerContextSelector.getLoggerContexts() |
Modifier and Type | Method and Description |
---|---|
protected Logger |
AsyncLoggerContext.newInstance(LoggerContext ctx,
String name,
MessageFactory messageFactory) |
void |
BasicAsyncLoggerContextSelector.removeContext(LoggerContext context) |
Constructor and Description |
---|
AsyncLogger(LoggerContext context,
String name,
MessageFactory messageFactory,
org.apache.logging.log4j.core.async.AsyncLoggerDisruptor loggerDisruptor)
Constructs an
AsyncLogger with the specified context, name and message factory. |
Modifier and Type | Method and Description |
---|---|
LoggerContext |
AbstractConfiguration.getLoggerContext() |
LoggerContext |
Configuration.getLoggerContext()
Gets the logger context.
|
static LoggerContext |
Configurator.initialize(ClassLoader loader,
Configuration configuration)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(ClassLoader loader,
Configuration configuration,
Object externalContext)
Initializes the Logging Context.
|
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(Configuration configuration)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(String name,
ClassLoader loader,
List<URI> configLocations,
Object externalContext) |
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,
Map.Entry<String,Object> entry)
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 |
---|---|
abstract Configuration |
ConfigurationFactory.getConfiguration(LoggerContext loggerContext,
ConfigurationSource source) |
Configuration |
ConfigurationFactory.getConfiguration(LoggerContext loggerContext,
String name,
URI configLocation)
Returns the Configuration.
|
Configuration |
ConfigurationFactory.getConfiguration(LoggerContext loggerContext,
String name,
URI configLocation,
ClassLoader loader)
Returns the Configuration obtained using a given ClassLoader.
|
void |
LoggerContextAware.setLoggerContext(LoggerContext loggerContext)
Injects the current LoggerContext into this object.
|
static void |
Configurator.shutdown(LoggerContext ctx)
Shuts down the given logger context.
|
static boolean |
Configurator.shutdown(LoggerContext ctx,
long timeout,
TimeUnit timeUnit)
Shuts down the given logger context.
|
Constructor and Description |
---|
AbstractConfiguration(LoggerContext loggerContext,
ConfigurationSource configurationSource)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
ConfigurationBuilder.setLoggerContext(LoggerContext loggerContext)
Sets the logger context.
|
Modifier and Type | Method and Description |
---|---|
void |
DefaultConfigurationBuilder.setLoggerContext(LoggerContext loggerContext) |
Constructor and Description |
---|
BuiltConfiguration(LoggerContext loggerContext,
ConfigurationSource source,
Component rootComponent) |
Modifier and Type | Method and Description |
---|---|
Configuration |
JsonConfigurationFactory.getConfiguration(LoggerContext loggerContext,
ConfigurationSource source) |
Constructor and Description |
---|
JsonConfiguration(LoggerContext loggerContext,
ConfigurationSource configSource) |
Modifier and Type | Method and Description |
---|---|
LoggerContext |
PropertiesConfigurationBuilder.getLoggerContext() |
Modifier and Type | Method and Description |
---|---|
PropertiesConfiguration |
PropertiesConfigurationFactory.getConfiguration(LoggerContext loggerContext,
ConfigurationSource source) |
PropertiesConfigurationBuilder |
PropertiesConfigurationBuilder.setLoggerContext(LoggerContext loggerContext) |
Constructor and Description |
---|
PropertiesConfiguration(LoggerContext loggerContext,
ConfigurationSource source,
Component root) |
Modifier and Type | Method and Description |
---|---|
Configuration |
XmlConfigurationFactory.getConfiguration(LoggerContext loggerContext,
ConfigurationSource source)
Returns the Configuration.
|
Constructor and Description |
---|
XmlConfiguration(LoggerContext loggerContext,
ConfigurationSource configSource) |
Modifier and Type | Method and Description |
---|---|
Configuration |
YamlConfigurationFactory.getConfiguration(LoggerContext loggerContext,
ConfigurationSource source) |
Constructor and Description |
---|
YamlConfiguration(LoggerContext loggerContext,
ConfigurationSource configSource) |
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,
Map.Entry<String,Object> entry,
boolean currentContext,
URI configLocation,
String name) |
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,
Configuration configuration)
Loads the LoggerContext using the ContextSelector using the provided Configuration
|
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,
List<URI> configLocations,
String name) |
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 | Field and Description |
---|---|
protected WeakReference<LoggerContext> |
Interpolator.loggerContext |
Modifier and Type | Method and Description |
---|---|
void |
Interpolator.setLoggerContext(LoggerContext loggerContext) |
Constructor and Description |
---|
MailManager(LoggerContext loggerContext,
String name) |
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 |
---|---|
protected LoggerContext |
ClassLoaderContextSelector.createContext(String name,
URI configLocation) |
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) |
default LoggerContext |
ContextSelector.getContext(String fqcn,
ClassLoader loader,
Map.Entry<String,Object> entry,
boolean currentContext)
Returns the LoggerContext.
|
default LoggerContext |
ContextSelector.getContext(String fqcn,
ClassLoader loader,
Map.Entry<String,Object> entry,
boolean currentContext,
URI configLocation)
Returns the LoggerContext.
|
LoggerContext |
ClassLoaderContextSelector.getContext(String fqcn,
ClassLoader loader,
Map.Entry<String,Object> entry,
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-2023 The 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.