All Classes and Interfaces
Class
Description
Abstract base class for implementations of Action.
Abstract base class for Appenders.
Subclasses can extend this abstract Builder.
The base Configuration.
StrLookup that is ConfigurationAware.
A superclass for Comma-Separated Value (CSV) layouts.
An abstract Appender for writing events to a database of some type, be it relational or NoSQL.
Manager that allows database appenders to have their configuration reloaded without losing events.
Implementations should extend this class for passing data between the getManager method and the manager factory
class.
A
ConnectionSource that uses a JDBC connection string, a user name, and a password to call
DriverManager.getConnection(String, String, String).Builds DriverManagerConnectionSource instances.
Abstract File Appender.
Builds FileAppender instances.
Users should extend this class to implement filters.
Enhances a Class by allowing it to contain Filters.
Subclasses can extend this abstract Builder.
Configuration of the KeyStore
Abstract base class for Layouts.
Subclasses can extend this abstract Builder.
A life cycle to be extended.
An abstract log event implementation with default values for all methods.
Base implementation of a Logger.
Provides an abstract base class to use for implementing LoggerAdapter.
A default lookup for others to extend.
Abstract base class used to register managers.
Implementations should extend this class for passing data between the getManager method and the manager factory
class.
Provides an abstract superclass for
MessageFactory2 implementations with default implementations (and for
MessageFactory by extension).Facilitates implementations of
NoSqlConnection.Appends log events as bytes to a byte output stream.
Subclasses can extend this abstract Builder.
Abstract action for processing files that are accepted by the specified PathFilters.
AbstractPatternConverter is an abstract class that provides the formatting functionality that derived classes need.
Base class for PluginVisitor implementations.
Container for the language and body of a script.
Abstract base class for managing sockets.
Abstract base class for Layouts that result in a String.
Variation of
AbstractStringLayout.Serializer that avoids allocating temporary objects.Style pattern converter.
Black style pattern converter.
Blue style pattern converter.
Cyan style pattern converter.
Green style pattern converter.
Magenta style pattern converter.
Red style pattern converter.
White style pattern converter.
Yellow style pattern converter.
Abstract convenience class for triggering policies that extend
AbstractLifeCycle and implement
TriggeringPolicy.Watcher for configuration files.
Helper class for triggering a reconfiguration in a background thread.
Appends log events as strings to a writer.
The Action interface should be implemented by any class that performs
file system actions for RollingFileAppenders after the close of
the active log file.
OSGi BundleActivator.
Consider this class private.
OSGi bundle activator.
Converts text into ANSI escape sequences.
Appends
LogEvents.Implementation of the
AppenderAdminMBean interface.The MBean interface for monitoring and managing an
Appender.Builder for constructing Appender Components.
Wraps an
Appender with details an appender implementation shouldn't need to know about.Data structure with similar semantics to CopyOnWriteArraySet, but giving direct access to the underlying array.
Thrown from an appender when a log event could not be written.
An Appender reference.
Assembler for constructing AppenderRef Components.
A deferred plugin for appenders.
An Appender container.
Interface used to check for portions of the configuration that may be optionally included.
Factory for creating instances of
ArrayBlockingQueue.PatternConverters implement this interface to accept an array of objects when formatting.Copied from Apache Commons Lang (including the
@since tags.)Utility class providing common validation logic.
Appends to one or more Appenders asynchronously.
Implementation of the
AsyncAppenderAdminMBean interface.The MBean interface for monitoring and managing an
AsyncAppender.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.AsyncLogger is a logger designed for high throughput and low latency logging.
Asynchronous Logger object that is created via configuration and can be
combined with synchronous loggers.
An asynchronous root Logger.
Default disruptor exception handler for errors that occur in the AsyncLogger background thread.
Encapsulates the mechanism used to log asynchronously.
Helper class decoupling the
AsyncLoggerConfig class from the LMAX Disruptor library.RingBuffer events contain all information necessary to perform the work in a separate thread.
LoggerContext that creates AsyncLogger objects.ContextSelector that manages AsyncLoggerContext instances.Default disruptor exception handler for errors that occur in the AsyncLogger background thread.
Consider this class private.
Policy for deciding whether to discard the event, enqueue it or log the event on the current thread when the queue
is full.
Creates
AsyncQueueFullPolicy instances based on user-specified system properties.This interface allows users to configure a custom Disruptor WaitStrategy used for
Async Loggers and Async LoggerConfigs.
This class allows users to configure the factory used to create
an instance of the LMAX disruptor WaitStrategy
used by Async Loggers in the log4j configuration.
Builds AsyncWaitStrategyFactoryConfig instances.
Interface to be implemented to add an Authorization header to an HTTP request.
ReliabilityStrategy that counts the number of threads that have started to log an event but have not completed yet,
and waits for these threads to finish before allowing the appenders to be stopped.
Reliability strategy that sleeps unconditionally for some time before allowing a Configuration to be stopped.
Base64 encodes Strings.
Returns either this Thread's context or the default
AsyncLoggerContext.Provides the Basic Authorization header to a request.
Returns either this Thread's context or the default LoggerContext.
An operation that accepts two input arguments and returns no result.
Factory for creating instances of
BlockingQueue.Boolean helpers.
Extended interface to allow bridges between logging systems to convey the
correct location information.
A type of builder that can be used to configure and create a instances using a Java DSL instead of
through a configuration file.
This is the general version of the Configuration created by the Builder.
ContextSelector for OSGi bundles.
The
BurstFilter is a logging filter that regulates logging traffic.ByteBufferDestination is the destination that
Encoders write binary data to.Helper class for ByteBufferDestination implementors.
Implementation of the
Clock interface that tracks the time in a
private long field that is updated by a background thread once every
millisecond.Interface to cancel a Runnable callback.
Consider this class private.
Conditional that determines if the specified class is present.
This ContextSelector chooses a LoggerContext based upon the ClassLoader of the caller.
Formats the class name of the site of the logging request.
Extension service provider interface to implement additional custom MDC behavior for
ThreadContext.Provides the time stamp used in log events.
Factory for
Clock objects.Adds entries to the
stack or map and them removes them when the object is closed, e.g. as part
of a try-with-resources.Closes resources.
A delegating OutputStream that does not close its delegate.
This Clock implementation is similar to CachedClock.
A configuration element used to configure which event properties are logged to which columns in the database table.
A configuration element for specifying a database column name mapping.
Builder for
ColumnMapping.
CommandLine interpreter that uses reflection to initialize an annotated domain object with values obtained from the
command line arguments.
Annotate your class with
@Command when you want more control over the format of the generated help
message.Default exception handler that prints the exception message to the specified
PrintStream, followed by the
usage message for the command or subcommand whose input was invalid.Exception indicating that multiple fields have been annotated with the same Option name.
Exception indicating a problem while invoking a command or subcommand.
A collection of methods and inner classes that provide fine-grained control over the contents and layout of
the usage help message to display to end users when help is requested or invalid input values were specified.
Provides methods and inner classes to support using ANSI escape codes in usage help messages.
Defines the interface for an ANSI escape sequence.
A set of pre-defined ANSI escape code styles and colors, and a set of convenience methods for parsing
text with embedded markup style names, as well as convenience methods for converting
styles to strings with embedded escape codes.
All usage help message are generated with a color scheme that assigns certain styles and colors to common
parts of a usage message: the command name, options, positional parameters and option parameters.
Policy for handling text that is longer than the column width:
span multiple columns, wrap to the next row, or simply truncate the portion that doesn't fit.
When customizing online help for
Option details, a custom IOptionRenderer can be
used to create textual representation of an Option in a tabular format: one or more rows, each containing
one or more columns.When customizing online help for
Parameters details, a custom IParameterRenderer
can be used to create textual representation of a Parameters field in a tabular format: one or more rows,
each containing one or more columns.When customizing online usage help for an option parameter or a positional parameter, a custom
IParamLabelRenderer can be used to render the parameter name or label to a String.Use a Layout to format usage help text for options and parameters in tabular format.
Responsible for spacing out
CommandLine.Help.Ansi.Text values according to the CommandLine.Help.Column definitions the table was
created with.Helper class to index positions in a
Help.TextTable.Represents a function that can handle a
ParameterException that occurred while
parsing the command line arguments.Exception indicating a problem during
CommandLine initialization.Represents a function that can process a List of
CommandLine objects resulting from successfully
parsing the command line arguments.
When parsing command line arguments and initializing
fields annotated with
@Option or @Parameters,
String values can be converted to any type for which a ITypeConverter is registered.Exception indicating that more values were specified for an option or parameter than its
arity allows.Exception indicating that a required parameter was not specified.
Exception indicating that an annotated field had a type for which no
CommandLine.ITypeConverter was
registered.
Annotate fields in your class with
@Option and picocli will initialize these fields when matching
arguments are specified on the command line.Exception indicating that an option for a single-value option field has been specified multiple times on the command line.
Exception indicating something went wrong while parsing command line options.
Exception indicating that there was a gap in the indices of the fields annotated with
CommandLine.Parameters.
Fields annotated with
@Parameters will be initialized with positional parameters.Base class of all exceptions thrown by
picocli.CommandLine.Describes the number of parameters required and accepted by an option or a positional parameter.
Command line parse result handler that prints help if requested, and otherwise executes the top-level command and
all subcommands as
Runnable or Callable.Command line parse result handler that prints help if requested, and otherwise executes the top-level
Runnable or Callable command.Command line parse result handler that prints help if requested, and otherwise executes the most specific
Runnable or Callable subcommand.Exception thrown by
CommandLine.ITypeConverter implementations to indicate a String could not be converted.Exception indicating that a command line argument could not be mapped to any of the fields annotated with
CommandLine.Option or CommandLine.Parameters.Compresses a file using bzip2 compression.
Container for building Configurations.
Builds arbitrary components and is the base type for the provided components.
A group of Actions to be executed in sequence.
A Composite Configuration.
Composes and invokes one or more filters.
Wraps multiple Filter Component builders.
Triggering policy that wraps other triggering policies.
Interface that must be implemented to create a configuration.
Indicates that a class requests the current Configuration to be injected.
Interface for building logging configurations.
Provides methods to create ConfigurationBuilders.
This exception is thrown when an error occurs reading from, parsing, using, or initializing the Log4j 2
configuration.
Factory class for parsed
Configuration objects from a configuration file.Factory Data that carries a configuration.
Watcher for configuration files.
Interface used to allow components to be notified when the configuration changes.
Represents the source for the logging configuration.
ConfigurationStrSubstitutor is a StrSubstitutor which only supports recursive evaluation of lookups.Initializes and configure the Logging system.
Configuration element for
JdbcAppender.Appends log events to
System.out or System.err using a layout specified by the user.Builds ConsoleAppender instances.
Enumeration of console destinations.
Log4j Constants.
Log4j API Constants.
Meta annotation to mark an annotation as a validation constraint.
Interface that
Constraint annotations must implement to perform validation logic.Utility class to locate an appropriate
ConstraintValidator implementation for an annotation.Anchor for the ThreadContext.
Consider this class private.
Consider this class private.
Consider this class private.
Factory for creating the StringMap instances used to initialize LogEvents' context data.
Responsible for initializing the context data of LogEvents.
Factory for ContextDataInjectors.
Source of context data to be added to each log event.
Consider this class private.
Looks up keys from the context.
Interface used to locate a LoggerContext.
Implementation of the
ContextSelectorAdminMBean interface.The MBean interface for monitoring and managing the
ContextSelector.Identifies the keys that are associated with a PatternConverter.
Deprecated.
Since 2.24.0 no class implements this.
No-Operation Appender that counts events.
Provides a parser and evaluator for unix-like cron expressions.
Rolls a file over based on a cron schedule.
A Comma-Separated Value (CSV) layout to log events.
A Comma-Separated Value (CSV) layout to log event parameters.
Assembler for constructing CustomLevel Components.
Descriptor of a custom Level object that is created via configuration.
Container for CustomLevelConfig objects.
Wrapper around
Generate.CustomLogger.A bounded buffer containing elements of type T.
OutputStream for UDP connections.
Socket Manager for UDP connections.
A
JdbcAppender connection source that uses a DataSource to connect to the database.Formats the current date or the date in the LogEvent.
Converts and formats the event's date in a StringBuilder.
Deprecated.
Starting with version
2.25.0, this class is assumed to be internal and planned to be removed in the next major release.Utility methods for Date classes.
Wraps a database exception like a JDBC SQLException.
The default advertiser does not do anything.
Default Condition for a Select Condition.
Default router: enqueue the event for asynchronous logging in the background thread, unless the current thread is the
background thread and the queue is full (enqueueing would cause a deadlock).
The default configuration writes all output to the Console using the default logging level.
The default
ErrorHandler implementation falling back to StatusLogger.Default factory for flow messages.
Collects data for a log event and then logs it.
Always creates new LogEvent instances.
Default implementation using the Core LoggerContext.
The default merge strategy for composite configurations.
Default implementation of
NoSqlObject.Reliability strategy that assumes reconfigurations will never take place.
When rolling over,
DefaultRolloverStrategy renames files according to an algorithm as described below.Builds DefaultRolloverStrategy instances.
ShutdownRegistrationStrategy that simply uses
Runtime.addShutdownHook(Thread).The default implementation of
ThreadContextMapA 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.Rollover or scheduled action for deleting old log files that are accepted by the specified PathFilters.
FileVisitor that deletes files that are accepted by all PathFilters.
This filter causes all logging events to be dropped.
Created by rgoers on 1/12/17.
When rolling over,
DirectWriteRolloverStrategy writes directly to the file as resolved by the file
pattern.Builds DirectWriteRolloverStrategy instances.
Discarding router extends the DefaultAsyncQueueFullPolicy by first verifying if the queue is fuller than the specified
threshold ratio; if this is the case, log events more specific than
the specified threshold level are dropped.
A
ConnectionSource that uses a JDBC connection string, a user name, and a password to call
DriverManager.getConnection(String, String, String).Builds DriverManagerConnectionSource instances.
Implementation of the
NanoClock interface that always returns a fixed value.Deprecated.
since 2.24.0 use
Duration instead.Compares against a log level that is associated with a context value.
Objects implementing the
Encoder interface know how to convert an object to some binary representation and
write the result to a ByteBuffer, ideally without creating temporary objects.Converter that encodes the output from a pattern using a specified format.
Formats the EndOfBatch.
Consider this class private.
Entry flow messages
Condition that determines if the specified environment variable is set.
Looks up keys from environment variables.
PropertySource implementation that uses environment variables as a source.
Equals pattern converter.
Equals ignore case pattern converter.
Equals pattern converter.
Appenders may delegate their error handling to
ErrorHandlers.Deprecated.
Deprecated since 2.24.0.
Looks up values from the log event.
Enumeration over the different destinations where a log event can be sent.
Excludes the listed keys.
Exit flow messages
Deprecated.
Extends the
Logger interface with methods that facilitate implementing or extending Loggers.Wrapper around
Generate.ExtendedLogger.Wrapper class that exposes the protected AbstractLogger methods to support wrapped loggers.
Deprecated.
Factory to create extended thread information.
ThrowablePatternConverter variant where the rendered StackTraceElements are enriched with the enclosing JAR file and its version information, if available.The facility codes used by the Syslog system.
A
JdbcAppender connection source that uses a public static factory method to obtain a Connection or
DataSource.The FailoverAppender will capture exceptions in an Appender and then route the event
to a different appender.
The array of failover Appenders.
Deprecated.
Starting with version
2.25.0, this class is assumed to be internal and planned to be removed in the next major release.Deprecated.
Starting with version
2.25.0, this class is assumed to be internal and planned to be removed in the next major release.File Appender.
Builds FileAppender instances.
Formats a date by delegating to
DatePatternConverter.Enumerates over supported file extensions for compression.
Returns the event's line location information in a StringBuilder.
Manages actual File I/O for File Appenders.
File rename action.
FileSize utility class.
File utilities.
Watches for changes in a
File and performs an action when the file is modified.Interface that must be implemented to allow custom event filtering.
The result that can returned from a filter method call.
Interface implemented by Classes that allow filtering to occur.
Component builder that can add Filters.
Assembler for constructing Filter Components.
Extends
ObjectInputStream to only allow some built-in Log4j classes and caller-specified classes to be
deserialized.Deprecated.
Starting with version
2.25.0, this class is assumed to be internal and planned to be removed in the next major release.Enumeration over the supported date/time format patterns.
Fixed time zone formats.
Implementation of the
PreciseClock interface that always returns a fixed time value.Flow messages
Creates flow messages.
Deprecated.
Starting with version
2.25.0, this class is assumed to be internal and planned to be removed in the next major release.Handles messages that contain a format String.
Modifies the output of a pattern converter for a specified minimum and maximum width and alignment.
Format the event's line location information.
SortedArrayStringMap-based implementation of the ThreadContextMap interface that attempts not to
create temporary objects.Lays out events in the Graylog Extended Log Format (GELF) 1.1.
Generates source code for custom or extended logger wrappers.
Generates source code for custom logger wrappers that only provide convenience methods for the specified custom
levels, not for the standard built-in levels.
Generates source code for extended logger wrappers that provide convenience methods for the specified custom
levels, and by extending
org.apache.logging.log4j.spi.ExtendedLoggerWrapper, inherit the convenience
methods for the built-in levels provided by the Logger interface.Java annotation processor that generates GraalVM metadata.
Compresses a file using GZ compression.
Converts Strings to hex.
Highlight pattern converter.
Outputs events as rows in an HTML table on an HTML page.
Possible font sizes
TODO Renders an input as HTML output.
Builds HttpAppender instances.
Utility method for reading data from an HTTP InputStream.
Policy is purging appenders that were not in use specified time in minutes
PathCondition that accepts paths after some count threshold is exceeded during the file tree walk.
PathCondition that accepts paths after the accumulated file size threshold is exceeded during the file tree walk.
Composite
PathCondition that only accepts objects that are accepted by all component conditions.Composite
PathCondition that accepts objects that are accepted by any component conditions.PathCondition that accepts files for deletion if their relative path matches either a glob pattern or a regular
expression.
PathCondition that accepts paths that are older than the specified duration.
Wrapper
PathCondition that accepts objects that are rejected by the wrapped component filter.Includes only the listed keys.
An extension of
ReadOnlyStringMap that imposes a total ordering on its keys.An extension of
StringMap that imposes a total ordering on its keys.Models a point in time, suitable for event timestamps.
Contract for formatting
Instants.Formats an
Instant numerically; e.g., formats its epoch1 seconds.Contract for formatting
Instants using a date and time formatting pattern.Formats an integer.
Helps deal with integers.
Indicates that the annotated element is considered an internal API to Log4j and should not be used by external
code.
Helper class providing some async logging-related functionality.
Exception thrown when an error occurs while accessing internal resources.
A registry of
Loggers namespaced by name and message factory.Proxies all the other
StrLookups.Copied from Apache Commons IO revision 1686747.
Renders an input as ANSI escaped output.
Looks up keys related to Java: Java version, JRE version, VM version, and so on.
Factory for creating instances of BlockingQueues backed by JCTools
MpscArrayQueue.This Appender writes logging events to a relational database using standard JDBC mechanisms.
An
AbstractDatabaseManager implementation for relational databases accessed via JDBC.Provides a read-only
StringMap view of a Map<String, String>.Sends log events to one or more ZeroMQ (JeroMQ) endpoints.
Manager for publishing messages via JeroMq.
Deprecated.
Use
org.apache.logging.log4j.core.appender.mom.jakarta.JmsAppender.Deprecated.
Use
org.apache.logging.log4j.core.appender.mom.jakarta.JmsManager.Helper class for closing JNDI resources.
This class can be used to define a custom logger repository.
Looks up keys from JNDI resources.
Manages a JNDI
DirContext.Creates a Node hierarchy from a JSON file.
Keeps constants separate from any class that may depend on third party jars.
Note: The JsonLayout should be considered to be deprecated.
Parses the output from JsonLayout layout into instances of
LogEvent.This class is borrowed from Jackson.
Configuration of the KeyStore
Key/Value pair configuration item.
Assembler for constructing KeyValuePair Components.
Class representing the configuration of KeyValue pairs.
Utility class for lambda support.
A Source that includes the last modified time.
An HostnameVerifier which accepts everything.
Lays out a LogEvent in different formats.
Assembler for constructing Layout Components.
Provides a lazily-initialized value from a
Supplier<T>.Levels used for identifying the severity of an event.
This filter returns the onMatch result if the logging level in the event matches the specified logging level
exactly.
Returns the event's level in a StringBuilder.
Selects the pattern to use based on the Level in the LogEvent.
Custom MarkerPatternSelector builder.
This filter returns the
AbstractFilter.onMatch result if the level of the LogEvent is in the range of the configured LevelRangeFilter.minLevel and LevelRangeFilter.maxLevel values, otherwise it returns the AbstractFilter.onMismatch result.All proper Java frameworks implement some sort of object life cycle.
Status of a life cycle like a
LoggerContext.Extends the LifeCycle interface.
Returns the event's line location information in a StringBuilder.
Formats a line separator.
Factory for creating instances of
LinkedTransferQueue.Class Description goes here.
Does nothing.
Consider this class private.
Consider this class private.
Formats a string literal.
Load resources (or images) from various sources.
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.
Classes that use location information should implement this interface.
Logger that accepts the location of the caller.
Interface to ensure delivery of log events to the appropriate Appenders while including location information.
ReliabilityStrategy that uses read/write locks to prevent the LoggerConfig from stopping while it is in use.
Encoder for StringBuilders that locks on the ByteBufferDestination.
Factory to locate a ContextSelector and then load a LoggerContext.
A Jackson JSON
ObjectMapper initialized for Log4j.Implementation of a LogEvent.
LogEvent Builder helper class.
Lookup properties of Log4j
Binding for the Log4j API.
In a Servlet 3.0 or newer environment, this initializer is responsible for starting up Log4j logging before anything
else happens in application initialization.
In environments older than Servlet 3.0, this initializer is responsible for starting up Log4j logging before anything
else happens in application initialization.
This is responsible for the following:
Clearing the logger context when the application has finished starting up.
Setting the logger context before processing a request and clearing it after processing a request.
Setting the logger context when the application is starting to shut down.
This filter is a once-per-request filter.
Used by Jackson to deserialize a
StackTraceElement.Prefixes thread names with
"Log4j2-".Creates
Log4jThreads.Specifies an interface for setting and clearing a thread-bound
LoggerContext in a Java EE web application.A Jackson XML
ObjectMapper initialized for Log4j.A Jackson
ObjectMapper initialized for Log4j.Interface for constructing log events before logging them.
Provides contextual information about a logged message.
Base class for server classes that listen to
LogEvents.Parse the output from a layout into instances of
LogEvent.LoggingEventPatternConverter is a base class for pattern converters
that can format information from instances of LoggingEvent.
Common component builder for Logger and RootLogger elements.
The core implementation of the
Logger interface.This is the central interface in the log4j package.
Serialization proxy class for Logger.
A basic registry for
LoggerContext objects and their associated external
Logger classes.Assembler for constructing Logger Components.
Logger object that is created via configuration.
Builds LoggerConfig instances.
The root Logger.
Builds LoggerConfig instances.
Implementation of the
LoggerConfigAdminMBean interface.The MBean interface for monitoring and managing a
LoggerConfig.The LoggerContext is the anchor for the logging system.
Anchor point for logging implementations.
Provides access to a Core Logger Context.
Implementation of the
LoggerContextAdminMBean interface.The MBean interface for monitoring and managing a
LoggerContext.Indicates that a class requests the current LoggerContext to be injected.
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.
A LoggerFields container.
Formats the Logger FQCN.
Message that is interested in the name of the Logger.
Rewrites log event levels for a given logger name.
Formats a logger name.
Convenience class to be used as an
ExtendedLogger registry by LoggerContext implementations.Deprecated.
As of version
2.25.0, planned to be removed!Deprecated.
As of version
2.25.0, planned to be removed!Deprecated.
As of version
2.25.0, planned to be removed!Container of Logger objects.
Exception thrown when an error occurs while logging.
The anchor point for the Log4j logging system.
Keeps track of LogManager initialization status;
Converts values to lower case.
Parent of all managers that send e-mails.
A map-based lookup for main arguments.
Creates Manager objects.
Consider this class private.
A Filter that operates on a Map.
A map-based lookup.
Represents a Message that consists of a Map.
When set as the format specifier causes the Map to be formatted as XML.
Able to handle the contents of the LogEvent's MapMessage and either
output the entire contents of the properties in a similar format to the
java.util.Hashtable.toString(), or to output the value of a specific key
within the Map.
This policy modifies events by replacing or possibly adding keys and values to the MapMessage.
An enumeration to identify whether keys not in the MapMessage should be added or whether only existing
keys should be updated.
Markers are objects that are used to add easily filterable information to log messages.
This filter returns the onMatch result if the marker in the LogEvent is the same as or has the
configured marker as a parent.
Looks-up markers.
Applications create Markers by using the Marker Manager.
Consider this class private, it is only public to satisfy Jackson for XML and JSON IO.
Returns events' full marker string in a StringBuilder.
Selects the pattern to use based on the Marker in the LogEvent.
Custom MarkerPatternSelector builder.
Appends an event's maker name to a StringBuilder.
Max length pattern converter.
Able to handle the contents of the LogEvent's MDC and either
output the entire contents of the properties in a similar format to the
java.util.Hashtable.toString(), or to output the value of a specific key
within the property bundle
when this pattern converter has the option set.
Consider this class private.
MementoMessage is intended to be used when we need to make an
immutable copy of a Message without forgetting the original
Message.getFormat() and Message.getParameters() values.Memory Mapped File Appender.
Builds RandomAccessFileAppender instances.
Extends OutputStreamManager but instead of using a buffered output stream, this class maps a region of a file into
memory and writes to this memory region.
Merges two configurations together
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.
Returns the event's rendered message in a StringBuilder.
Classes implementing this interface know how to supply
Messages.Returns the event's line location information in a StringBuilder.
Container for the
MonitorResource element.Builds MonitorResource instances.
Container for the
MonitorResources element.Advertise an entity via ZeroConf/MulticastDNS and the JmDNS library.
A Message that can render itself in more than one way.
A Message that can render itself in more than one way.
An instantaneous point on the time line, used for high-precision log event timestamps.
Mutable implementation of the
LogEvent interface.TODO
NameAbbreviator generates abbreviated logger and class names.
ContextSelectors that have a name.
Represents named date & time patterns for formatting log timestamps.
Abstract base class for other pattern converters which can return only parts of their name.
Provides the high-resolution time stamp used in log events.
Converts and formats the event's nanoTime in a StringBuilder.
Returns the event's NDC in a StringBuilder.
Networking-related convenience methods.
A Configuration node.
This filter returns the onMatch result if there is no marker in the LogEvent.
ThreadContextMap implementation used when either of system properties disableThreadContextMap or .This Appender writes logging events to a NoSQL database using a configured NoSQL provider.
Builds ConsoleAppender instances.
Represents a connection to the NoSQL database.
An
AbstractDatabaseManager implementation for all NoSQL databases.Represents a simple POJO object inserted into a NoSQL object.
Implementations of this class are plugins for configuring the
NoSqlAppender with the proper provider
(MongoDB, etc.).Marks a plugin builder field or plugin factory parameter of type
CharSequence that can not be blank.Validator that checks if a
CharSequence is not entirely composed of
whitespace.An Appender that ignores log events.
This configuration defaults to no logging.
Writes all data to the famous /dev/null.
An
Iterator over an array of objects.Handles messages that contain an Object[].
Handles messages that contain an Object.
Extension service provider interface to allow putting Object values in the
ThreadContext.Triggers a rollover on every restart, but only if the file size is greater than zero.
A convenience class to convert property values to specific types.
Identifies the relative ordering of a
ConfigurationFactory plugin.Comparator for classes annotated with
Order.Appends log events to a given output stream using a layout.
Builds OutputStreamAppender instances.
Manages an OutputStream so that it can be shared by multiple Appenders and will
allow appenders to reconfigure without requiring a new stream.
An operation that accepts two input arguments and returns no result.
A
Message accepting argument placeholders in the formatting pattern.Allows message parameters to be iterated over without any allocation
or memory copies.
Thrown when the input cannot be parsed.
Decrypt passwords.
PasswordProvider implementations are able to produce a password from somewhere.
Filter that accepts or rejects a candidate
Path for deletion.PathSorter that sorts path by their LastModified attribute.Defines the interface of classes that can sort Paths.
Tuple of a
Path and BasicFileAttributes, used for sorting.Interface that all PatternConverters must implement.
A flexible layout configurable with pattern string.
Custom PatternLayout builder.
PatternMatch configuration item.
Most of the work of the
PatternLayout class is delegated to the
PatternParser class.Parses the rollover pattern.
Pattern strings used throughout Log4j.
Allows different patterns to be used with the PatternLayout based on some selection criteria.
Indicates that a particular annotated construct was written with certain performance constraints in mind that
should be considered when modifying or testing.
Renders input unchanged.
Annotation that identifies a Class as a Plugin.
Identifies a Plugin Attribute and its default value.
PluginVisitor implementation for
PluginAttribute.Builder class to instantiate and configure a Plugin object using a PluginFactory method or PluginBuilderFactory
builder class.
Marks a field as a Plugin Attribute.
PluginVisitor for PluginBuilderAttribute.
Marks a method as a factory for custom Plugin builders.
Identifies a parameter or field as a Configuration.
PluginVisitor implementation for
PluginConfiguration.Identifies a parameter as a Plugin and corresponds with an XML element (or equivalent) in configuration files.
PluginVisitor implementation for
PluginElement.Memento object for storing a plugin entry to a cache file.
Identifies a Method as the factory to create the plugin.
Identifies a parameter or field as a LoggerContext.
PluginVisitor implementation for
PluginConfiguration.Loads and manages all the plugins.
Identifies a Plugin configuration Node.
PluginVisitor implementation for
PluginNode.Annotation processor for pre-scanning Log4j 2 plugins.
Registry singleton for PluginType maps partitioned by source type and then by category names.
A Test that checks to see if each class is annotated with the 'Plugin' annotation.
Plugin Descriptor.
Plugin utilities.Identifies a parameter as a value.
PluginVisitor implementation for
PluginValue.Visitor strategy for parsing data from a
Node, doing any relevant type conversion, and returning a
parsed value for that variable.Utility class to locate an appropriate
PluginVisitor implementation for an annotation.Meta-annotation to denote the class name to use that implements
PluginVisitor for the annotated annotation.File POSIX attribute view action.
Builder for the POSIX view attribute action.
Extension of the
Clock interface that is able to provide more accurate time information than milliseconds
since the epoch.The Priority used in the Syslog system.
Provides the PID of the current JVM.
Configuration created from a properties file.
Helper builder for parsing properties files into a PropertiesConfiguration.
Creates a PropertiesConfiguration from a properties file.
A lookup designed for
Properties defined in the configuration.Handles properties defined in the configuration.
PropertySource backed by a
Properties instance.This policy modifies events by replacing or possibly adding keys and values to the MapMessage.
Consider this class private.
Represents a key/value pair in the configuration.
Assembler for constructing Property Components.
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.
Enumerates the supported protocols.
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.
Policy for purging routed appenders
File Appender.
Builds RandomAccessFileAppender instances.
Extends OutputStreamManager but instead of using a buffered output stream,
this class uses a
ByteBuffer and a RandomAccessFile to do the
I/O.Provides support for the
reachability-metadata.json
file format.Specifies a field that needs to be accessed through reflection.
Specifies a method that needs to be accessed through reflection.
Collection of reflection metadata.
Specifies a Java type that needs to be accessed through reflection.
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.Implemented by Configurations that can be reconfigured at runtime.
Utility class for performing common reflective operations.
A filter that matches the given regular expression pattern against messages.
Replace tokens in the LogEvent message.
Replacement pattern converter.
Returns the relative time in milliseconds since JVM Startup.
Interface for objects that know how to ensure delivery of log events to the appropriate appenders, even during and
after the configuration has been modified while the system is actively used.
Factory for ReliabilityStrategies.
Equals pattern converter.
Marks a plugin builder field or plugin factory parameter as required.
Validator that checks an object for emptiness.
ResolverUtil is used to locate classes that are available in the/a class path and meet arbitrary conditions.
A simple interface that specifies how to test classes to determine if they are to be included in the results
produced by the ResolverUtil.
Looks up keys from resource bundles.
Garbage-free LogEventFactory that reuses a single mutable log event.
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.
This Appender allows the logging event to be manipulated before it is processed by other Appenders.
Interface to be implemented by components that support modifications to the LogEvent.
Enumerates the RFC 1349 TOS field.
Formats a log event in accordance with RFC 5424.
Instruments an LMAX Disruptor ring buffer.
The MBean interface for monitoring and managing an LMAX Disruptor ring
buffer.
When the Disruptor is started, the RingBuffer is populated with event objects.
Deprecated.
Only used internally, will be removed in the next major version.
This class is responsible for writing elements that make up a log event into
the ringbuffer
RingBufferLogEvent.An appender that writes to files and can roll over at intervals.
Builds FileAppender instances.
The Rolling File Manager.
An appender that writes to random access files and can roll over at
intervals.
Extends RollingFileManager but instead of using a buffered output stream, this class uses a
ByteBuffer and a
RandomAccessFile to do the I/O.Description of actions needed to complete rollover.
Description of actions needed to complete rollover.
Enumeration of rollover frequency values.
Implementations of this interface that are registered with the RollingFileManager will be notified before and
after a rollover occurs.
A
RollingPolicy specifies the actions taken on a logging file rollover.Assembler for constructing the root Logger Components.
ThrowablePatternConverter variant where the stack trace causal chain is rendered in reverse order.A Route to an appender.
Contains the individual Route elements.
This Appender "routes" between various Appenders, some of which can be references to
Appenders defined earlier in the configuration while others can be dynamically created
within this Appender as required.
RuntimeStrSubstitutor is a StrSubstitutor which only supports evaluation of top-level lookups.Annotation that identifies a Class as requiring a Scheduled thread.
Container for the language and body of a script.
Builds an appender.
Condition that evaluates a script.
Assembler for constructing Layout Components.
A condition of the
DeleteAction where a user-provided script selects the files to delete from a provided
list.Container for the language and body of a script file along with the file location.
Assembler for constructing ScriptFile Components.
Returns the onMatch result if the script returns True and returns the onMismatch value otherwise.
Manages the scripts use by the Configuration.
Selects the pattern to use based on the result of executing a Script.
Custom ScriptPatternSelector builder.
Contains a reference to a script defined elsewhere in the configuration.
A container of Scripts.
Factory class to provide a
SecretKey instance.Class Description goes here.
Formats the event sequence number.
Provides methods to increase the safety of object serialization/deserialization.
Deprecated.
Java Serialization has inherent security weaknesses, see https://www.owasp.org/index.php/Deserialization_of_untrusted_data .
Creates MBeans to instrument various classes in the log4j class hierarchy.
An utility class to retrieve services in a safe way.
Logs using the ServletContext's log method
Severity values used by the Syslog system.
Registry used for Runnable shutdown callback instances.
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.
Consider this class private.
A
Provider implementation to use SimpleLoggerContext.Plugin to hold a hostname and port (socket address).
An Appender that delivers events over socket connections.
Subclasses can extend this abstract Builder.
Builds a SocketAppender.
Holds all socket options settable via
Socket methods.Holds all socket options settable via
Socket.setPerformancePreferences(int, int, int).Consider this class private.
Array-based implementation of the
ReadOnlyStringMap interface.FileVisitor that sorts files.
Represents the source for the logging configuration as an immutable object.
SSL Configuration
Creates an SSL configuration from Log4j properties.
Consider this class private. Provides various methods to determine the caller class.
Consider this class private. Provides various methods to determine the caller class.
Defines constants use for naming stack trace elements.
Standard Logging Levels as an enumeration for use internally.
Status from reading the InputStream.
Configuration for setting up the
StatusLogger fallback listener.Deprecated.
This class is not used anymore and only kept for binary backward compatibility.
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.Implementation of the
StatusLoggerAdminMBean interface.The MBean interface for monitoring and managing the
StatusLogger.Encoder for StringBuilders that uses ThreadLocals to avoid locking as much as possible.
Objects that implement this interface can be converted to text, ideally without allocating temporary objects.
Consider this class private.
Writer implementation that outputs to a StringBuilder.Encodes Strings to bytes.
Handles messages that consist of a format string conforming to
Formatter.Instantiates the
Layout type for String-based layouts.Exposes methods to add and remove key-value pairs to and from
ReadOnlyStringMap.A
StringMapMessage typed to String-only values.This filter returns the onMatch result if the logging level in the event matches the specified logging level
exactly.
Consider this class private.
Lookup a String key to a String value.
A matcher class that can be queried to determine if a character array
portion matches.
Substitutes variables within a string by values.
A collection of StructuredDataMessages.
Filter based on data in a StructuredDataMessage.
The StructuredData identifier.
Looks up keys from
StructuredDataMessage log messages.Represents a Message that conforms to an RFC 5424 StructuredData element along with the syslog message.
Supported formats.
Style pattern converter.
Consider this class private.
Classes implementing this interface know how to supply a value.
Annotation to suppress Spotbugs warnings.
Annotation to suppress Spotbugs warnings.
The Syslog Appender.
Formats a log event as a BSD Log record.
Builds a SyslogLayout.
Implementation of the
Clock interface that returns the system time.Implementation of the
Clock interface that returns the system time in millisecond granularity.Implementation of the
NanoClock interface that returns the system nano time.Looks up keys from system properties.
PropertySource backed by the current system properties.
Condition that determines if the specified property is set.
Manager of TCP Socket connections.
Factory to create a TcpSocketManager.
Interface to be implemented by LoggerContext's that provide a shutdown method.
Helper class to encode text to binary data without allocating temporary objects.
Parses the output from a text based layout into instances of
LogEvent.Renders an input to an output.
The ThreadContext allows applications to store information either in a Map or a Stack.
The ThreadContext Stack interface.
ThreadContextDataInjector contains a number of strategies for copying key-value pairs from the various
ThreadContext map implementations into a StringMap.The
ContextDataInjector used when the ThreadContextMap implementation is a copy-on-write
StringMap-based data structure.Default
ContextDataInjector for the legacy Map<String, String>-based ThreadContext (which is
also the ThreadContext implementation used for web applications).The
ContextDataInjector used when the ThreadContextMap implementation is a garbage-free
StringMap-based data structure.ContextDataProvider for ThreadContext data.
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.
Filter based on a value in the Thread Context Map (MDC).
Service provider interface to implement custom NDC behavior for
ThreadContext.Captures information about all running Threads.
Factory to create Thread information.
Formats the event thread ID.
Interface used to print basic or extended thread information.
Strategy for deciding whether thread name should be cached or not.
Formats the event thread name.
Formats the event thread priority.
This filter returns the onMatch result if the level in the
LogEvent is the same or more specific
than the configured level and the onMismatch value otherwise.Contains options which control how a
Throwable pattern is formatted.Deprecated.
Helps with Throwable objects.
Rolls a file over based on time.
Filters events that fall within a specified time period in each day.
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.
Wraps messages that are formatted according to RFC 5425.
Utility class for transforming strings.
An operation that accepts three input arguments and returns no result.
A
TriggeringPolicy controls the conditions under which rollover
occurs.Configuration of the TrustStore
Interface for doing automatic String conversion to a specific type.
Registry for
TypeConverter plugins.Collection of basic TypeConverter implementations.
Parses a
String into a BigDecimal.Parses a
String into a BigInteger.Converts a
String into a byte[].Converts a
String into a char[].Deprecated.
since 2.24.0.
Converts a
String into an InetAddress.Returns the given
String, no conversion takes place.Utility class for working with Java
Types and derivatives.Utility for preventing primitive parameter values from being auto-boxed.
This class represents an immutable map, which stores its state inside a single Object[]:
[0] contains the number of entries
Others contain alternating key-value pairs, for example [1]="1" and [2]="value_for_1"
Keys are calculated using (index * 2 + 1) and values are (index * 2 + 2).
Provides access to unsafe operations.
Converts values to upper case.
Constructs an HTTPURLConnection.
Formats a UUID.
Generates a unique ID.
Indicates that a plugin attribute must be a valid host.
Validator that checks an object to verify it is a valid hostname or IP address.
Indicates that a plugin attribute must be a valid port number.
Validator that checks an object to verify it is a valid port number (an integer between 0 and 65535).
VariablesNotEmpty pattern converter.
Watches for changes in a Source and performs an action when it is modified.
Creates Watchers of various types.
Manages
FileWatchers.Convenience methods for retrieving the
LoggerContext associated with a
particular ServletContext.Appends log events to a
Writer.Builds WriterAppender instances.
Manages a Writer so that it can be shared by multiple Appenders and will
allow appenders to reconfigure without requiring a new writer.
Creates a Node hierarchy from an XML file.
Factory to construct an XmlConfiguration.
Keeps constants separate from any class that may depend on third party jars.
Appends a series of
event elements as defined in the
Log4j-events.xsd.Parses the output from XmlLayout layout into instances of
LogEvent.Appends a series of YAML events as strings serialized as bytes.
Parses the output from YamlLayout layout into instances of
LogEvent.Compresses a file using Zip compression.