Package | Description |
---|---|
org.apache.log4j |
Log4j 1.x compatibility layer.
|
org.apache.log4j.config |
Log4j 1.x compatibility layer.
|
org.apache.logging.log4j.core |
Implementation of Log4j 2.
|
org.apache.logging.log4j.core.appender |
Log4j 2 Appenders.
|
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.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 | Field and Description |
---|---|
private static java.util.Map<LoggerContext,java.util.concurrent.ConcurrentMap<java.lang.String,Logger>> |
Category.CONTEXT_MAP |
Modifier and Type | Method and Description |
---|---|
static LoggerContext |
LogManager.PrivateManager.getContext() |
static LoggerContext |
Logger.PrivateManager.getContext() |
static LoggerContext |
Category.PrivateManager.getContext() |
Modifier and Type | Method and Description |
---|---|
(package private) static Logger |
Category.getInstance(LoggerContext context,
java.lang.Class clazz) |
(package private) static Logger |
Category.getInstance(LoggerContext context,
java.lang.String name) |
(package private) static Logger |
Category.getInstance(LoggerContext context,
java.lang.String name,
Category.PrivateAdapter factory) |
(package private) static Logger |
Category.getInstance(LoggerContext context,
java.lang.String name,
LoggerFactory factory) |
private static java.util.concurrent.ConcurrentMap<java.lang.String,Logger> |
Category.getLoggersMap(LoggerContext context) |
(package private) static Logger |
Category.getRoot(LoggerContext context) |
Constructor and Description |
---|
Category(LoggerContext context,
java.lang.String name)
Constructor used by Logger to specify a LoggerContext.
|
Logger(LoggerContext context,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
Configuration |
Log4j1ConfigurationFactory.getConfiguration(LoggerContext loggerContext,
ConfigurationSource source) |
Modifier and Type | Field and Description |
---|---|
private LoggerContext |
Logger.context |
private LoggerContext |
LogEventListener.context |
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(java.lang.ClassLoader loader,
boolean currentContext,
java.net.URI configLocation)
Returns a LoggerContext.
|
Modifier and Type | Method and Description |
---|---|
protected Logger |
LoggerContext.newInstance(LoggerContext ctx,
java.lang.String name,
MessageFactory messageFactory) |
Constructor and Description |
---|
Logger(LoggerContext context,
java.lang.String name,
MessageFactory messageFactory)
The constructor.
|
Modifier and Type | Field and Description |
---|---|
private LoggerContext |
AbstractManager.loggerContext |
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,
java.lang.String name) |
FileManager(LoggerContext loggerContext,
java.lang.String fileName,
java.io.OutputStream os,
boolean append,
boolean locking,
boolean createOnDemand,
java.lang.String advertiseURI,
Layout<? extends java.io.Serializable> layout,
boolean writeHeader,
java.nio.ByteBuffer buffer) |
OutputStreamManager(LoggerContext loggerContext,
java.io.OutputStream os,
java.lang.String streamName,
boolean createOnDemand,
Layout<? extends java.io.Serializable> layout,
boolean writeHeader,
java.nio.ByteBuffer byteBuffer) |
RandomAccessFileManager(LoggerContext loggerContext,
java.io.RandomAccessFile file,
java.lang.String fileName,
java.io.OutputStream os,
int bufferSize,
java.lang.String advertiseURI,
Layout<? extends java.io.Serializable> layout,
boolean writeHeader) |
Constructor and Description |
---|
RollingFileManager(LoggerContext loggerContext,
java.lang.String fileName,
java.lang.String pattern,
java.io.OutputStream os,
boolean append,
boolean createOnDemand,
long size,
long time,
TriggeringPolicy triggeringPolicy,
RolloverStrategy rolloverStrategy,
java.lang.String advertiseURI,
Layout<? extends java.io.Serializable> layout,
boolean writeHeader,
java.nio.ByteBuffer buffer) |
RollingRandomAccessFileManager(LoggerContext loggerContext,
java.io.RandomAccessFile raf,
java.lang.String fileName,
java.lang.String pattern,
java.io.OutputStream os,
boolean append,
boolean immediateFlush,
int bufferSize,
long size,
long time,
TriggeringPolicy policy,
RolloverStrategy strategy,
java.lang.String advertiseURI,
Layout<? extends java.io.Serializable> layout,
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(java.lang.String name,
java.net.URI configLocation) |
Modifier and Type | Method and Description |
---|---|
protected Logger |
AsyncLoggerContext.newInstance(LoggerContext ctx,
java.lang.String name,
MessageFactory messageFactory) |
Constructor and Description |
---|
AsyncLogger(LoggerContext context,
java.lang.String name,
MessageFactory messageFactory,
AsyncLoggerDisruptor loggerDisruptor)
Constructs an
AsyncLogger with the specified context, name and message factory. |
Modifier and Type | Field and Description |
---|---|
private java.lang.ref.WeakReference<LoggerContext> |
AbstractConfiguration.loggerContext |
Modifier and Type | Method and Description |
---|---|
LoggerContext |
Configuration.getLoggerContext()
Gets the logger context.
|
LoggerContext |
AbstractConfiguration.getLoggerContext() |
static LoggerContext |
Configurator.initialize(java.lang.ClassLoader loader,
Configuration configuration)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(java.lang.ClassLoader loader,
Configuration configuration,
java.lang.Object externalContext)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(java.lang.ClassLoader loader,
ConfigurationSource source)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(java.lang.ClassLoader loader,
ConfigurationSource source,
java.lang.Object externalContext)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(Configuration configuration)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(java.lang.String name,
java.lang.ClassLoader loader,
java.util.List<java.net.URI> configLocations,
java.lang.Object externalContext) |
static LoggerContext |
Configurator.initialize(java.lang.String name,
java.lang.ClassLoader loader,
java.lang.String configLocation)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(java.lang.String name,
java.lang.ClassLoader loader,
java.lang.String configLocation,
java.lang.Object externalContext)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(java.lang.String name,
java.lang.ClassLoader loader,
java.net.URI configLocation)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(java.lang.String name,
java.lang.ClassLoader loader,
java.net.URI configLocation,
java.lang.Object externalContext)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(java.lang.String name,
java.lang.String configLocation)
Initializes the Logging Context.
|
Modifier and Type | Method and Description |
---|---|
private Configuration |
ConfigurationFactory.Factory.getConfiguration(LoggerContext loggerContext,
boolean isTest,
java.lang.String name) |
abstract Configuration |
ConfigurationFactory.getConfiguration(LoggerContext loggerContext,
ConfigurationSource source) |
Configuration |
ConfigurationFactory.Factory.getConfiguration(LoggerContext loggerContext,
ConfigurationSource source) |
private Configuration |
ConfigurationFactory.Factory.getConfiguration(LoggerContext loggerContext,
java.lang.String configLocationStr) |
Configuration |
ConfigurationFactory.getConfiguration(LoggerContext loggerContext,
java.lang.String name,
java.net.URI configLocation)
Returns the Configuration.
|
Configuration |
ConfigurationFactory.Factory.getConfiguration(LoggerContext loggerContext,
java.lang.String name,
java.net.URI configLocation)
Default Factory Constructor.
|
Configuration |
ConfigurationFactory.getConfiguration(LoggerContext loggerContext,
java.lang.String name,
java.net.URI configLocation,
java.lang.ClassLoader loader)
Returns the Configuration obtained using a given ClassLoader.
|
static void |
Configurator.shutdown(LoggerContext ctx)
Shuts down the given logger context.
|
static boolean |
Configurator.shutdown(LoggerContext ctx,
long timeout,
java.util.concurrent.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 | Field and Description |
---|---|
private LoggerContext |
DefaultConfigurationBuilder.loggerContext |
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 | Field and Description |
---|---|
private LoggerContext |
PropertiesConfigurationBuilder.loggerContext |
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 | Field and Description |
---|---|
static java.lang.ThreadLocal<LoggerContext> |
ContextAnchor.THREAD_CONTEXT
Anchor for the LoggerContext for the current Thread.
|
Modifier and Type | Method and Description |
---|---|
LoggerContext |
Log4jContextFactory.getContext(java.lang.String fqcn,
java.lang.ClassLoader loader,
java.lang.Object externalContext,
boolean currentContext)
Loads the LoggerContext using the ContextSelector.
|
LoggerContext |
Log4jContextFactory.getContext(java.lang.String fqcn,
java.lang.ClassLoader loader,
java.lang.Object externalContext,
boolean currentContext,
Configuration configuration)
Loads the LoggerContext using the ContextSelector using the provided Configuration
|
LoggerContext |
Log4jContextFactory.getContext(java.lang.String fqcn,
java.lang.ClassLoader loader,
java.lang.Object externalContext,
boolean currentContext,
ConfigurationSource source)
Loads the LoggerContext using the ContextSelector.
|
LoggerContext |
Log4jContextFactory.getContext(java.lang.String fqcn,
java.lang.ClassLoader loader,
java.lang.Object externalContext,
boolean currentContext,
java.util.List<java.net.URI> configLocations,
java.lang.String name) |
LoggerContext |
Log4jContextFactory.getContext(java.lang.String fqcn,
java.lang.ClassLoader loader,
java.lang.Object externalContext,
boolean currentContext,
java.net.URI configLocation,
java.lang.String name)
Loads the LoggerContext using the ContextSelector.
|
Modifier and Type | Field and Description |
---|---|
private LoggerContext |
LoggerContextAdmin.loggerContext |
private LoggerContext |
LoggerConfigAdmin.loggerContext |
Modifier and Type | Method and Description |
---|---|
private static void |
Server.registerAppenders(LoggerContext ctx,
javax.management.MBeanServer mbs,
java.util.concurrent.Executor executor) |
private static void |
Server.registerLoggerConfigs(LoggerContext ctx,
javax.management.MBeanServer mbs,
java.util.concurrent.Executor executor) |
Constructor and Description |
---|
LoggerConfigAdmin(LoggerContext loggerContext,
LoggerConfig loggerConfig)
Constructs a new
LoggerConfigAdmin with the specified LoggerContext
and logger config. |
LoggerContextAdmin(LoggerContext loggerContext,
java.util.concurrent.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(java.lang.String fqcn,
java.lang.ClassLoader loader,
boolean currentContext,
java.net.URI configLocation) |
private static LoggerContext |
BundleContextSelector.locateContext(org.osgi.framework.Bundle bundle,
java.net.URI configLocation) |
Modifier and Type | Field and Description |
---|---|
private static LoggerContext |
JndiContextSelector.CONTEXT |
private static LoggerContext |
BasicContextSelector.CONTEXT |
Modifier and Type | Field and Description |
---|---|
private static java.util.concurrent.ConcurrentMap<java.lang.String,LoggerContext> |
JndiContextSelector.CONTEXT_MAP |
protected static java.util.concurrent.ConcurrentMap<java.lang.String,java.util.concurrent.atomic.AtomicReference<java.lang.ref.WeakReference<LoggerContext>>> |
ClassLoaderContextSelector.CONTEXT_MAP |
private static java.util.concurrent.atomic.AtomicReference<LoggerContext> |
ClassLoaderContextSelector.DEFAULT_CONTEXT |
Modifier and Type | Method and Description |
---|---|
protected LoggerContext |
ClassLoaderContextSelector.createContext(java.lang.String name,
java.net.URI configLocation) |
LoggerContext |
JndiContextSelector.getContext(java.lang.String fqcn,
java.lang.ClassLoader loader,
boolean currentContext) |
LoggerContext |
ContextSelector.getContext(java.lang.String fqcn,
java.lang.ClassLoader loader,
boolean currentContext)
Returns the LoggerContext.
|
LoggerContext |
ClassLoaderContextSelector.getContext(java.lang.String fqcn,
java.lang.ClassLoader loader,
boolean currentContext) |
LoggerContext |
BasicContextSelector.getContext(java.lang.String fqcn,
java.lang.ClassLoader loader,
boolean currentContext) |
LoggerContext |
JndiContextSelector.getContext(java.lang.String fqcn,
java.lang.ClassLoader loader,
boolean currentContext,
java.net.URI configLocation) |
LoggerContext |
ContextSelector.getContext(java.lang.String fqcn,
java.lang.ClassLoader loader,
boolean currentContext,
java.net.URI configLocation)
Returns the LoggerContext.
|
LoggerContext |
ClassLoaderContextSelector.getContext(java.lang.String fqcn,
java.lang.ClassLoader loader,
boolean currentContext,
java.net.URI configLocation) |
LoggerContext |
BasicContextSelector.getContext(java.lang.String fqcn,
java.lang.ClassLoader loader,
boolean currentContext,
java.net.URI configLocation) |
protected LoggerContext |
ClassLoaderContextSelector.getDefault() |
private LoggerContext |
ClassLoaderContextSelector.locateContext(java.lang.ClassLoader loaderOrNull,
java.net.URI configLocation) |
LoggerContext |
NamedContextSelector.locateContext(java.lang.String name,
java.lang.Object externalContext,
java.net.URI configLocation)
Locate the LoggerContext with the specified name.
|
LoggerContext |
JndiContextSelector.locateContext(java.lang.String name,
java.lang.Object externalContext,
java.net.URI configLocation) |
LoggerContext |
BasicContextSelector.locateContext(java.lang.String name,
java.lang.String configLocation) |
LoggerContext |
NamedContextSelector.removeContext(java.lang.String name)
Locate the LoggerContext with the specified name using the default configuration.
|
LoggerContext |
JndiContextSelector.removeContext(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
java.util.List<LoggerContext> |
JndiContextSelector.getLoggerContexts() |
java.util.List<LoggerContext> |
ContextSelector.getLoggerContexts()
Returns a List of all the available LoggerContexts.
|
java.util.List<LoggerContext> |
ClassLoaderContextSelector.getLoggerContexts() |
java.util.List<LoggerContext> |
BasicContextSelector.getLoggerContexts() |
Modifier and Type | Method and Description |
---|---|
void |
JndiContextSelector.removeContext(LoggerContext context) |
void |
ContextSelector.removeContext(LoggerContext context)
Remove any references to the LoggerContext.
|
void |
ClassLoaderContextSelector.removeContext(LoggerContext context) |
void |
BasicContextSelector.removeContext(LoggerContext context) |