Uses of Class
org.apache.logging.log4j.core.LoggerContext
Packages that use 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
Methods in org.apache.logging.log4j.core that return LoggerContextModifier 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()
Methods in org.apache.logging.log4j.core with parameters of type LoggerContextModifier and TypeMethodDescriptionprotected Logger
LoggerContext.newInstance
(LoggerContext ctx, String name, MessageFactory messageFactory) Constructors in org.apache.logging.log4j.core with parameters of type LoggerContextModifierConstructorDescriptionprotected
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
Methods in org.apache.logging.log4j.core.appender that return LoggerContextModifier and TypeMethodDescriptionAbstractManager.getLoggerContext()
Gets the logger context used to create this instance or null.ConfigurationFactoryData.getLoggerContext()
Gets the LoggerContext from the Configuration or null.Constructors in org.apache.logging.log4j.core.appender with parameters of type LoggerContextModifierConstructorDescriptionprotected
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
Methods in org.apache.logging.log4j.core.appender.mom.kafka with parameters of type LoggerContextModifier and TypeMethodDescriptionstatic KafkaManager
KafkaManager.getManager
(LoggerContext loggerContext, String name, String topic, boolean syncSend, Property[] properties, String key) Deprecated.Constructors in org.apache.logging.log4j.core.appender.mom.kafka with parameters of type LoggerContextModifierConstructorDescriptionKafkaManager
(LoggerContext loggerContext, String name, String topic, boolean syncSend, Property[] properties, String key) -
Uses of LoggerContext in org.apache.logging.log4j.core.appender.rolling
Constructors in org.apache.logging.log4j.core.appender.rolling with parameters of type LoggerContextModifierConstructorDescriptionprotected
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
Subclasses of LoggerContext in org.apache.logging.log4j.core.asyncModifier and TypeClassDescriptionclass
LoggerContext
that createsAsyncLogger
objects.Methods in org.apache.logging.log4j.core.async that return LoggerContextModifier 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) Methods in org.apache.logging.log4j.core.async that return types with arguments of type LoggerContextMethods in org.apache.logging.log4j.core.async with parameters of type LoggerContextModifier and TypeMethodDescriptionprotected Logger
AsyncLoggerContext.newInstance
(LoggerContext ctx, String name, MessageFactory messageFactory) void
BasicAsyncLoggerContextSelector.removeContext
(LoggerContext context) Constructors in org.apache.logging.log4j.core.async with parameters of type LoggerContextModifierConstructorDescriptionAsyncLogger
(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
Methods in org.apache.logging.log4j.core.config that return LoggerContextModifier 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.Methods in org.apache.logging.log4j.core.config with parameters of type LoggerContextModifier 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.Constructors in org.apache.logging.log4j.core.config with parameters of type LoggerContextModifierConstructorDescriptionprotected
AbstractConfiguration
(LoggerContext loggerContext, ConfigurationSource configurationSource) Constructor. -
Uses of LoggerContext in org.apache.logging.log4j.core.config.builder.api
Methods in org.apache.logging.log4j.core.config.builder.api with parameters of type LoggerContextModifier and TypeMethodDescriptionvoid
ConfigurationBuilder.setLoggerContext
(LoggerContext loggerContext) Sets the logger context. -
Uses of LoggerContext in org.apache.logging.log4j.core.config.builder.impl
Methods in org.apache.logging.log4j.core.config.builder.impl with parameters of type LoggerContextModifier and TypeMethodDescriptionvoid
DefaultConfigurationBuilder.setLoggerContext
(LoggerContext loggerContext) Constructors in org.apache.logging.log4j.core.config.builder.impl with parameters of type LoggerContextModifierConstructorDescriptionBuiltConfiguration
(LoggerContext loggerContext, ConfigurationSource source, Component rootComponent) -
Uses of LoggerContext in org.apache.logging.log4j.core.config.json
Methods in org.apache.logging.log4j.core.config.json with parameters of type LoggerContextModifier and TypeMethodDescriptionJsonConfigurationFactory.getConfiguration
(LoggerContext loggerContext, ConfigurationSource source) Constructors in org.apache.logging.log4j.core.config.json with parameters of type LoggerContextModifierConstructorDescriptionJsonConfiguration
(LoggerContext loggerContext, ConfigurationSource configSource) -
Uses of LoggerContext in org.apache.logging.log4j.core.config.properties
Methods in org.apache.logging.log4j.core.config.properties that return LoggerContextMethods in org.apache.logging.log4j.core.config.properties with parameters of type LoggerContextModifier and TypeMethodDescriptionPropertiesConfigurationFactory.getConfiguration
(LoggerContext loggerContext, ConfigurationSource source) PropertiesConfigurationBuilder.setLoggerContext
(LoggerContext loggerContext) Constructors in org.apache.logging.log4j.core.config.properties with parameters of type LoggerContextModifierConstructorDescriptionPropertiesConfiguration
(LoggerContext loggerContext, ConfigurationSource source, Component root) -
Uses of LoggerContext in org.apache.logging.log4j.core.config.xml
Methods in org.apache.logging.log4j.core.config.xml with parameters of type LoggerContextModifier and TypeMethodDescriptionXmlConfigurationFactory.getConfiguration
(LoggerContext loggerContext, ConfigurationSource source) Returns the Configuration.Constructors in org.apache.logging.log4j.core.config.xml with parameters of type LoggerContextModifierConstructorDescriptionXmlConfiguration
(LoggerContext loggerContext, ConfigurationSource configSource) -
Uses of LoggerContext in org.apache.logging.log4j.core.config.yaml
Methods in org.apache.logging.log4j.core.config.yaml with parameters of type LoggerContextModifier and TypeMethodDescriptionYamlConfigurationFactory.getConfiguration
(LoggerContext loggerContext, ConfigurationSource source) Constructors in org.apache.logging.log4j.core.config.yaml with parameters of type LoggerContextModifierConstructorDescriptionYamlConfiguration
(LoggerContext loggerContext, ConfigurationSource configSource) -
Uses of LoggerContext in org.apache.logging.log4j.core.impl
Fields in org.apache.logging.log4j.core.impl with type parameters of type LoggerContextModifier and TypeFieldDescriptionstatic final ThreadLocal<LoggerContext>
ContextAnchor.THREAD_CONTEXT
Anchor for the LoggerContext for the current Thread.Methods in org.apache.logging.log4j.core.impl that return LoggerContextModifier 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
Constructors in org.apache.logging.log4j.core.jmx with parameters of type LoggerContextModifierConstructorDescriptionLoggerConfigAdmin
(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
Fields in org.apache.logging.log4j.core.lookup with type parameters of type LoggerContextModifier and TypeFieldDescriptionprotected WeakReference<LoggerContext>
Interpolator.loggerContext
Methods in org.apache.logging.log4j.core.lookup with parameters of type LoggerContextModifier and TypeMethodDescriptionvoid
Interpolator.setLoggerContext
(LoggerContext loggerContext) -
Uses of LoggerContext in org.apache.logging.log4j.core.net
Constructors in org.apache.logging.log4j.core.net with parameters of type LoggerContext -
Uses of LoggerContext in org.apache.logging.log4j.core.osgi
Methods in org.apache.logging.log4j.core.osgi that return LoggerContextModifier and TypeMethodDescriptionBundleContextSelector.getContext
(String fqcn, ClassLoader loader, boolean currentContext, URI configLocation) -
Uses of LoggerContext in org.apache.logging.log4j.core.selector
Fields in org.apache.logging.log4j.core.selector with type parameters of type LoggerContextModifier and TypeFieldDescriptionprotected static final ConcurrentMap<String,
AtomicReference<WeakReference<LoggerContext>>> ClassLoaderContextSelector.CONTEXT_MAP
Methods in org.apache.logging.log4j.core.selector that return LoggerContextModifier 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.Methods in org.apache.logging.log4j.core.selector that return types with arguments of type LoggerContextModifier and TypeMethodDescriptionBasicContextSelector.getLoggerContexts()
ClassLoaderContextSelector.getLoggerContexts()
ContextSelector.getLoggerContexts()
Returns a List of all the available LoggerContexts.JndiContextSelector.getLoggerContexts()
Methods in org.apache.logging.log4j.core.selector with parameters of type LoggerContextModifier 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)