Uses of Class
org.apache.logging.log4j.core.LoggerContext
Package
Description
Implementation of Log4j 2.
Log4j 2 Appenders.
Classes and interfaces for Kafka appender support.
Rolling File Appender and support classes.
Provides Asynchronous Logger classes and interfaces for low-latency logging.
Configuration of Log4j 2.
Configuration Builder API for programmatically configuring Log4j.
Configuration Builder Implementation.
Classes and interfaces supporting configuration of Log4j 2 with JSON.
Configuration using Properties files.
Classes and interfaces supporting configuration of Log4j 2 with XML.
Classes and interfaces supporting configuration of Log4j 2 with YAML.
Log4j 2 private implementation classes.
Log4j 2 JMX support.
Log4j 2 Lookups.
Log4j 2 network support.
Collection of OSGi-specific classes for bundles.
Log4j 2 Context Selectors.
-
Uses of LoggerContext in org.apache.logging.log4j.core
Modifier and TypeMethodDescriptionLogger.getContext()
Returns the LoggerContext this Logger is associated with.static LoggerContext
LoggerContext.getContext()
Returns the current LoggerContext.static LoggerContext
LoggerContext.getContext
(boolean currentContext) Returns a LoggerContext.static LoggerContext
LoggerContext.getContext
(ClassLoader loader, boolean currentContext, URI configLocation) Returns a LoggerContext.DefaultLoggerContextAccessor.getLoggerContext()
LoggerContextAccessor.getLoggerContext()
Modifier and TypeMethodDescriptionprotected Logger
LoggerContext.newInstance
(LoggerContext ctx, String name, MessageFactory messageFactory) ModifierConstructorDescriptionprotected
Logger
(LoggerContext context, String name, MessageFactory messageFactory) Constructs an instance using the givenLoggerContext
, logger name, andMessageFactory
.protected
Logger
(LoggerContext context, String name, MessageFactory messageFactory, FlowMessageFactory flowMessageFactory) The canonical constructor. -
Uses of LoggerContext in org.apache.logging.log4j.core.appender
Modifier and TypeMethodDescriptionAbstractManager.getLoggerContext()
Gets the logger context used to create this instance or null.ConfigurationFactoryData.getLoggerContext()
Gets the LoggerContext from the Configuration or null.ModifierConstructorDescriptionprotected
AbstractManager
(LoggerContext loggerContext, String name) protected
FileManager
(LoggerContext loggerContext, String fileName, OutputStream os, boolean append, boolean locking, boolean createOnDemand, String advertiseURI, Layout<? extends Serializable> layout, boolean writeHeader, ByteBuffer buffer) Deprecated.protected
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) protected
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) protected
OutputStreamManager
(LoggerContext loggerContext, OutputStream os, String streamName, boolean createOnDemand, Layout<? extends Serializable> layout, boolean writeHeader, ByteBuffer byteBuffer) protected
RandomAccessFileManager
(LoggerContext loggerContext, RandomAccessFile file, String fileName, OutputStream os, int bufferSize, String advertiseURI, Layout<? extends Serializable> layout, boolean writeHeader) -
Uses of LoggerContext in org.apache.logging.log4j.core.appender.mom.kafka
Modifier and TypeMethodDescriptionstatic KafkaManager
KafkaManager.getManager
(LoggerContext loggerContext, String name, String topic, boolean syncSend, Property[] properties, String key) Deprecated.ModifierConstructorDescriptionKafkaManager
(LoggerContext loggerContext, String name, String topic, boolean syncSend, Property[] properties, String key) -
Uses of LoggerContext in org.apache.logging.log4j.core.appender.rolling
ModifierConstructorDescriptionprotected
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.protected
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) -
Uses of LoggerContext in org.apache.logging.log4j.core.async
Modifier and TypeClassDescriptionclass
LoggerContext
that createsAsyncLogger
objects.Modifier and TypeMethodDescriptionprotected LoggerContext
AsyncLoggerContextSelector.createContext
(String name, URI configLocation) BasicAsyncLoggerContextSelector.getContext
(String fqcn, ClassLoader loader, boolean currentContext) BasicAsyncLoggerContextSelector.getContext
(String fqcn, ClassLoader loader, boolean currentContext, URI configLocation) Modifier and TypeMethodDescriptionprotected Logger
AsyncLoggerContext.newInstance
(LoggerContext ctx, String name, MessageFactory messageFactory) void
BasicAsyncLoggerContextSelector.removeContext
(LoggerContext context) ModifierConstructorDescriptionAsyncLogger
(LoggerContext context, String name, MessageFactory messageFactory, org.apache.logging.log4j.core.async.AsyncLoggerDisruptor loggerDisruptor) Constructs anAsyncLogger
with the specified context, name and message factory. -
Uses of LoggerContext in org.apache.logging.log4j.core.config
Modifier and TypeMethodDescriptionAbstractConfiguration.getLoggerContext()
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
(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, ClassLoader loader, URI configLocation, Map.Entry<String, Object> entry) Initializes the Logging Context.static LoggerContext
Configurator.initialize
(String name, ClassLoader loader, List<URI> configLocations, Object externalContext) static LoggerContext
Configurator.initialize
(String name, String configLocation) Initializes the Logging Context.static LoggerContext
Configurator.initialize
(Configuration configuration) Initializes the Logging Context.Modifier and TypeMethodDescriptionConfigurationFactory.getConfiguration
(LoggerContext loggerContext, String name, URI configLocation) Returns the Configuration.ConfigurationFactory.getConfiguration
(LoggerContext loggerContext, String name, URI configLocation, ClassLoader loader) Returns the Configuration obtained using a given ClassLoader.abstract Configuration
ConfigurationFactory.getConfiguration
(LoggerContext loggerContext, ConfigurationSource source) 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.ModifierConstructorDescriptionprotected
AbstractConfiguration
(LoggerContext loggerContext, ConfigurationSource configurationSource) Constructor. -
Uses of LoggerContext in org.apache.logging.log4j.core.config.builder.api
Modifier and TypeMethodDescriptionvoid
ConfigurationBuilder.setLoggerContext
(LoggerContext loggerContext) Sets the logger context. -
Uses of LoggerContext in org.apache.logging.log4j.core.config.builder.impl
Modifier and TypeMethodDescriptionvoid
DefaultConfigurationBuilder.setLoggerContext
(LoggerContext loggerContext) ModifierConstructorDescriptionBuiltConfiguration
(LoggerContext loggerContext, ConfigurationSource source, Component rootComponent) -
Uses of LoggerContext in org.apache.logging.log4j.core.config.json
Modifier and TypeMethodDescriptionJsonConfigurationFactory.getConfiguration
(LoggerContext loggerContext, ConfigurationSource source) ModifierConstructorDescriptionJsonConfiguration
(LoggerContext loggerContext, ConfigurationSource configSource) -
Uses of LoggerContext in org.apache.logging.log4j.core.config.properties
Modifier and TypeMethodDescriptionPropertiesConfigurationFactory.getConfiguration
(LoggerContext loggerContext, ConfigurationSource source) PropertiesConfigurationBuilder.setLoggerContext
(LoggerContext loggerContext) ModifierConstructorDescriptionPropertiesConfiguration
(LoggerContext loggerContext, ConfigurationSource source, Component root) -
Uses of LoggerContext in org.apache.logging.log4j.core.config.xml
Modifier and TypeMethodDescriptionXmlConfigurationFactory.getConfiguration
(LoggerContext loggerContext, ConfigurationSource source) Returns the Configuration.ModifierConstructorDescriptionXmlConfiguration
(LoggerContext loggerContext, ConfigurationSource configSource) -
Uses of LoggerContext in org.apache.logging.log4j.core.config.yaml
Modifier and TypeMethodDescriptionYamlConfigurationFactory.getConfiguration
(LoggerContext loggerContext, ConfigurationSource source) ModifierConstructorDescriptionYamlConfiguration
(LoggerContext loggerContext, ConfigurationSource configSource) -
Uses of LoggerContext in org.apache.logging.log4j.core.impl
Modifier and TypeFieldDescriptionstatic final ThreadLocal<LoggerContext>
ContextAnchor.THREAD_CONTEXT
Anchor for the LoggerContext for the current Thread.Modifier and TypeMethodDescriptionLog4jContextFactory.getContext
(String fqcn, ClassLoader loader, Object externalContext, boolean currentContext) Loads the LoggerContext using the ContextSelector.Log4jContextFactory.getContext
(String fqcn, ClassLoader loader, Object externalContext, boolean currentContext, URI configLocation, String name) Loads the LoggerContext using the ContextSelector.Log4jContextFactory.getContext
(String fqcn, ClassLoader loader, Object externalContext, boolean currentContext, List<URI> configLocations, String name) Log4jContextFactory.getContext
(String fqcn, ClassLoader loader, Object externalContext, boolean currentContext, Configuration configuration) Loads the LoggerContext using the ContextSelector using the provided ConfigurationLog4jContextFactory.getContext
(String fqcn, ClassLoader loader, Object externalContext, boolean currentContext, ConfigurationSource source) Loads the LoggerContext using the ContextSelector.Log4jContextFactory.getContext
(String fqcn, ClassLoader loader, Map.Entry<String, Object> entry, boolean currentContext, URI configLocation, String name) -
Uses of LoggerContext in org.apache.logging.log4j.core.jmx
ModifierConstructorDescriptionLoggerConfigAdmin
(LoggerContext loggerContext, LoggerConfig loggerConfig) Constructs a newLoggerConfigAdmin
with the specified LoggerContext and logger config.LoggerContextAdmin
(LoggerContext loggerContext, Executor executor) Constructs a newLoggerContextAdmin
with theExecutor
to be used for sendingNotification
s asynchronously to listeners. -
Uses of LoggerContext in org.apache.logging.log4j.core.lookup
Modifier and TypeFieldDescriptionprotected WeakReference<LoggerContext>
Interpolator.loggerContext
Modifier and TypeMethodDescriptionvoid
Interpolator.setLoggerContext
(LoggerContext loggerContext) -
Uses of LoggerContext in org.apache.logging.log4j.core.net
-
Uses of LoggerContext in org.apache.logging.log4j.core.osgi
Modifier and TypeMethodDescriptionBundleContextSelector.getContext
(String fqcn, ClassLoader loader, boolean currentContext, URI configLocation) -
Uses of LoggerContext in org.apache.logging.log4j.core.selector
Modifier and TypeFieldDescriptionprotected static final ConcurrentMap<String,
AtomicReference<WeakReference<LoggerContext>>> ClassLoaderContextSelector.CONTEXT_MAP
Modifier and TypeMethodDescriptionprotected LoggerContext
ClassLoaderContextSelector.createContext
(String name, URI configLocation) BasicContextSelector.getContext
(String fqcn, ClassLoader loader, boolean currentContext) BasicContextSelector.getContext
(String fqcn, ClassLoader loader, boolean currentContext, URI configLocation) ClassLoaderContextSelector.getContext
(String fqcn, ClassLoader loader, boolean currentContext) ClassLoaderContextSelector.getContext
(String fqcn, ClassLoader loader, boolean currentContext, URI configLocation) ClassLoaderContextSelector.getContext
(String fqcn, ClassLoader loader, Map.Entry<String, Object> entry, boolean currentContext, URI configLocation) ContextSelector.getContext
(String fqcn, ClassLoader loader, boolean currentContext) Returns the LoggerContext.ContextSelector.getContext
(String fqcn, ClassLoader loader, boolean currentContext, URI configLocation) Returns the LoggerContext.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.JndiContextSelector.getContext
(String fqcn, ClassLoader loader, boolean currentContext) JndiContextSelector.getContext
(String fqcn, ClassLoader loader, boolean currentContext, URI configLocation) protected LoggerContext
ClassLoaderContextSelector.getDefault()
BasicContextSelector.locateContext
(String name, String configLocation) JndiContextSelector.locateContext
(String name, Object externalContext, URI configLocation) NamedContextSelector.locateContext
(String name, Object externalContext, URI configLocation) Locate the LoggerContext with the specified name.JndiContextSelector.removeContext
(String name) NamedContextSelector.removeContext
(String name) Locate the LoggerContext with the specified name using the default configuration.Modifier and TypeMethodDescriptionBasicContextSelector.getLoggerContexts()
ClassLoaderContextSelector.getLoggerContexts()
ContextSelector.getLoggerContexts()
Returns a List of all the available LoggerContexts.JndiContextSelector.getLoggerContexts()
Modifier and TypeMethodDescriptionvoid
BasicContextSelector.removeContext
(LoggerContext context) void
ClassLoaderContextSelector.removeContext
(LoggerContext context) void
ContextSelector.removeContext
(LoggerContext context) Remove any references to the LoggerContext.void
JndiContextSelector.removeContext
(LoggerContext context)