All Classes and Interfaces

Class
Description
Base implementation of a Logger.
Provides an abstract base class to use for implementing LoggerAdapter.
Provides an abstract superclass for MessageFactory2 implementations with default implementations (and for MessageFactory by extension).
Consider this class private. OSGi bundle activator.
Annotation that signals to asynchronous logging components that messages of this type can safely be passed to a background thread without calling Message.getFormattedMessage() first.
Base64 encodes Strings.
An operation that accepts two input arguments and returns no result.
Extended interface to allow bridges between logging systems to convey the correct location information.
 
Consider this class private.
Extension service provider interface to implement additional custom MDC behavior for ThreadContext.
Adds entries to the stack or map and them removes them when the object is closed, e.g.
 
Log4j API Constants.
Deprecated.
Since 2.24.0 no class implements this.
Default factory for flow messages.
The default implementation of ThreadContextMap
A copy-on-write thread-safe variant of org.apache.logging.log4j.spi.ThreadContextStack in which all mutative operations (add, pop, and so on) are implemented by making a fresh copy of the underlying list.
Consider this class private.
Entry flow messages
PropertySource implementation that uses environment variables as a source.
Deprecated.
Logger accepts StructuredDataMessages, users should use to that instead.
Exit flow messages
Extends the Logger interface with methods that facilitate implementing or extending Loggers.
Wrapper class that exposes the protected AbstractLogger methods to support wrapped loggers.
Extends ObjectInputStream to only allow some built-in Log4j classes and caller-specified classes to be deserialized.
Flow messages
Creates flow messages.
Handles messages that contain a format String.
Creates FormattedMessage instances for MessageFactory2 methods (and MessageFactory by extension.)
An extension of ReadOnlyStringMap that imposes a total ordering on its keys.
An extension of StringMap that imposes a total ordering on its keys.
Indicates that the annotated element is considered an internal API to Log4j and should not be used by external code.
Exception thrown when an error occurs while accessing internal resources.
Utility class for lambda support.
Provides a lazily-initialized value from a Supplier<T>.
 
Levels used for identifying the severity of an event.
Consider this class private. Utility class for ClassLoaders.
Provides some level of compatibility with Log4j 1.x and convenience but is not the recommended way to Localize messages.
Creates FormattedMessage instances for MessageFactory2 methods (and MessageFactory by extension.)
Logger that accepts the location of the caller.
Interface for constructing log events before logging them.
This is the central interface in the log4j package.
A basic registry for LoggerContext objects and their associated external Logger classes.
Anchor point for logging implementations.
Implemented by factories that create LoggerContext objects.
Deprecated.
with no replacement - no longer used
Interface allowing interested classes to know when a LoggerContext has shutdown - if the LoggerContext implementation provides a way to register listeners.
LoggerContexts implementing this are able register LoggerContextShutdownAware classes.
Message that is interested in the name of the Logger.
Convenience class to be used as an ExtendedLogger registry by LoggerContext implementations.
Data structure contract for the internal storage of admitted loggers.
Exception thrown when an error occurs while logging.
The anchor point for the Log4j logging system.
Represents a Message that consists of a Map.
When set as the format specifier causes the Map to be formatted as XML.
Markers are objects that are used to add easily filterable information to log messages.
Applications create Markers by using the Marker Manager.
Consider this class private, it is only public to satisfy Jackson for XML and JSON IO.
An interface for various Message implementations that can be logged.
A Message that is a collection of Messages.
Creates messages.
Creates messages.
Adapts a legacy MessageFactory to the new MessageFactory2 interface.
Handles messages that consist of a format string conforming to java.text.MessageFormat.
Creates FormattedMessage instances for MessageFactory2 methods (and MessageFactory by extension.)
Classes implementing this interface know how to supply Messages.
A Message that can render itself in more than one way.
A Message that can render itself in more than one way.
TODO
ThreadContextMap implementation used when either of system properties disableThreadContextMap or .
Handles messages that contain an Object[].
Handles messages that contain an Object.
Extension service provider interface to allow putting Object values in the ThreadContext.
 
An operation that accepts two input arguments and returns no result.
A Message accepting argument placeholders in the formatting pattern.
Creates FormattedMessage instances for MessageFactory2 methods (and MessageFactory by extension.)
Creates FormattedMessage instances for MessageFactory2 methods (and MessageFactory by extension.)
Allows message parameters to be iterated over without any allocation or memory copies.
Indicates that a particular annotated construct was written with certain performance constraints in mind that should be considered when modifying or testing.
Provides the PID of the current JVM.
PropertySource backed by a Properties instance.
Consider this class private.
PropertySource backed by a properties file.
A source for global configuration properties.
Comparator for ordering PropertySource instances by priority.
Utility methods useful for PropertySource implementations.
Service class used to bind the Log4j API with an implementation.
Utility class to register Log4j2 providers in an OSGI environment.
Consider this class private.
A read-only collection of String keys mapped to values of arbitrary type.
Read-only view of the data structure that implements MDC behavior for ThreadContext.
Messages implementing this interface are reused between logging calls.
Implementation of the MessageFactory interface that avoids allocating temporary objects where possible.
Mutable Message wrapper around an Object message.
Reusable parameterized message.
Mutable Message wrapper around a String message.
An utility class to retrieve services in a safe way.
This is the default logger that is used when no suitable logging implementation is available.
A simple LoggerContext implementation.
Simple and stateless LoggerContextFactory.
The simplest possible implementation of Message.
Creates FormattedMessage instances for MessageFactory2 methods (and MessageFactory by extension.)
Consider this class private. Array-based implementation of the ReadOnlyStringMap interface.
Consider this class private. Provides various methods to determine the caller class.
Consider this class private. Provides various methods to determine the caller class.
Standard Logging Levels as an enumeration for use internally.
A StatusListener that writes to the console.
The Status data.
Interface that allows implementers to be notified of events in the logging system.
Records events that occur in the logging system.
Holder for user-provided StatusLogger configurations.
Objects that implement this interface can be converted to text, ideally without allocating temporary objects.
Consider this class private.
Handles messages that consist of a format string conforming to Formatter.
Creates FormattedMessage instances for MessageFactory2 methods (and MessageFactory by extension.)
Exposes methods to add and remove key-value pairs to and from ReadOnlyStringMap.
A StringMapMessage typed to String-only values.
Consider this class private.
A collection of StructuredDataMessages.
The StructuredData identifier.
Represents a Message that conforms to an RFC 5424 StructuredData element along with the syslog message.
Supported formats.
Consider this class private. Classes implementing this interface know how to supply a value.
PropertySource backed by the current system properties.
Interface to be implemented by LoggerContext's that provide a shutdown method.
The ThreadContext allows applications to store information either in a Map or a Stack.
The ThreadContext Stack interface.
Service provider interface to implement custom MDC behavior for ThreadContext.
Extension service provider interface to implement additional custom MDC behavior for ThreadContext.
Creates the ThreadContextMap instance used by the ThreadContext.
Service provider interface to implement custom NDC behavior for ThreadContext.
Captures information about all running Threads.
Factory to create Thread information.
Interface used to print basic or extended thread information.
Primarily used in unit tests, but can be used to track elapsed time for a request or portion of any other operation so long as all the timer methods are called on the same thread in which it was started.
 
Messages that use this interface will cause the timestamp in the message to be used instead of the timestamp in the LogEvent.
An operation that accepts three input arguments and returns no result.
Utility for preventing primitive parameter values from being auto-boxed.