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.
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.
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.
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.
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.
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.
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.
Converts text into ANSI escape sequences.
Renders an input as ANSI escaped output.
Appends
LogEvent
s.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
.PatternConverter
s implement this interface to accept an array of objects when formatting.Copied from Apache Commons Lang (including the
@since
tags.)Appends to one or more Appenders asynchronously.
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.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.
Decodes Base64 strings.
Provides the Basic Authorization header to a request.
Returns either this Thread's context or the default LoggerContext.
Factory for creating instances of
BlockingQueue
.Boolean helpers.
Deprecated.
Present only for compatibility with Log4j 2 2.x plugins.
This is the general version of the Configuration created by the Builder.
The
BurstFilter
is a logging filter that regulates logging traffic.ByteBufferDestination is the destination that
Encoder
s write binary data to.Helper class for ByteBufferDestination implementors.
Interface to cancel a Runnable callback.
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.
Provides the time stamp used in log events.
Factory for
Clock
objects.Closes resources.
A delegating OutputStream that does not close its delegate.
A configuration element for specifying a database column name mapping.
Builder for
ColumnMapping
.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.
A factory to produce actions that compress log files.
Interface for plugins that provide additional compression algorithms.
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.
Marker interface used by new child elements of a
Configuration
.Factory class for parsed
Configuration
objects from a configuration file.Factory Data that carries a configuration.
Watcher for configuration files.
Processes a parsed tree of configuration nodes into configurable plugin objects described
by the configuration tree.
Represents the source for the logging configuration.
RuntimeStrSubstitutor
is a StrSubstitutor
which only supports recursive evaluation of lookups.Initializes and configure the Logging system.
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.
Anchor for the ThreadContext.
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.
Looks up keys from the context.
Interface used to locate a LoggerContext.
Identifies the keys that are associated with a PatternConverter.
Provides instance binding defaults.
Post-processor that registers
CoreDefaultBundle
for default bindings
used in Log4j and the services specified by properties.Configuration properties for HTTP Basic authentication.
Properties related to the retrieval of a configuration.
Properties to tune garbage collection.
A container for keystore configuration data.
Stores the configuration of the default SslConfiguration.
Configuration properties for the Log4j 1.x bridge.
General
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[]
.Converts a
String
into an InetAddress
.Converts a
String
into a Log4j Level
.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.
Assembler for constructing CustomLevel Components.
Descriptor of a custom Level object that is created via configuration.
Container for CustomLevelConfig objects.
A bounded buffer containing elements of type T.
OutputStream for UDP connections.
Socket Manager for UDP connections.
Formats the current date or the date in the LogEvent.
Converts and formats the event's date in a StringBuilder.
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.
Default factory for using a plugin selected based on the configuration source.
The default
ErrorHandler
implementation falling back to StatusLogger
.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)
.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.
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.
Condition that determines if the specified environment variable is set.
Looks up keys from environment variables.
Equals pattern converter.
Equals ignore case pattern converter.
Equals pattern converter.
Appenders may delegate their error handling to
ErrorHandlers
.Looks up values from the log event.
Enumeration over the different destinations where a log event can be sent.
ThrowablePatternConverter
variant where the rendered StackTraceElement
s are enriched with the enclosing JAR file and its version information, if available.The facility codes used by the Syslog system.
The FailoverAppender will capture exceptions in an Appender and then route the event
to a different appender.
The array of failover Appenders.
File Appender.
Builds FileAppender instances.
Formats a date by delegating to
DatePatternConverter
.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.
Modifies the output of a pattern converter for a specified minimum and maximum width and alignment.
Format the event's line location information.
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.
Sends log events over HTTP.
Builds HttpAppender instances.
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.Models a point in time, suitable for event timestamps.
Contract for formatting
Instant
s.Formats an
Instant
numerically; e.g., formats its epoch1 seconds.Contract for formatting
Instant
s using a date and time formatting pattern.Formats an integer.
Helps deal with integers.
Helper class providing some async logging-related functionality.
Proxies other
StrLookup
s using a keys within ${} markers.Looks up keys related to Java: Java version, JRE version, VM version, and so on.
Provides a read-only
StringMap
view of a Map<String, String>
.Maps JVM input arguments (but not main arguments) using JMX to acquire JVM arguments.
Configuration of the KeyStore
Key/Value pair configuration item.
Assembler for constructing KeyValuePair Components.
Class representing the configuration of KeyValue pairs.
An HostnameVerifier which accepts everything.
Converts
LogEvent
instances into different layouts of data.Assembler for constructing Layout Components.
Post-processor that adds support for legacy plugin annotations from Log4j2.
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated, for removal: This API element is subject to removal in a future version.
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
.Returns the event's line location information in a StringBuilder.
Formats a line separator.
Factory for creating instances of
LinkedTransferQueue
.Formats a string literal.
Load resources (or images) from various sources.
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.
Implementation of a LogEvent.
LogEvent Builder helper class.
Lookup properties of Log4j
Post-processor that registers a
ReflectionAgent
using log4j-core
as the calling context.Binding for the Log4j API.
Prefixes thread names with
"Log4j2-"
.Creates
Log4jThread
s.Provides contextual information about a logged message.
Base class for server classes that listen to
LogEvent
s.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.Assembler for constructing Logger Components.
Logger object that is created via configuration.
Builds LoggerConfig instances.
The root Logger.
Builds LoggerConfig instances.
The LoggerContext is the anchor for the logging system.
Provides access to a Core Logger Context.
Indicates that a class requests the current LoggerContext to be injected.
A LoggerFields container.
Formats the Logger FQCN.
Rewrites log event levels for a given logger name.
Formats a logger name.
Container of Logger objects.
Plugin namespace for
StrLookup
plugins.Converts values to lower case.
A map-based lookup for main arguments.
Exception thrown when there is a problem creating or obtaining an
AbstractManager
.Creates Manager objects.
Registry for
AbstractManager
instances.A Filter that operates on a Map.
A map-based lookup.
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.
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.
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.
Immutable copy of a LogEvent.
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
Returns the event's rendered message in a StringBuilder.
Returns the event's line location information in a StringBuilder.
Advertise an entity via ZeroConf/MulticastDNS and the JmDNS library.
An instantaneous point on the timeline, used for high-precision log event timestamps.
Mutable implementation of the
ReusableLogEvent
interface.Filter based on a value in the Thread Context Map (MDC).
NameAbbreviator generates abbreviated logger and class names.
ContextSelectors that have a name.
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 neutral filter where all filter methods return
Filter.Result.NEUTRAL
.This filter returns the onMatch result if there is no marker in the LogEvent.
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.).An Appender that ignores log events.
This configuration defaults to no logging.
An
Iterator
over an array of objects.Triggers a rollover on every restart, but only if the file size is greater than zero.
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.
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.
Renders input unchanged.
Deprecated, for removal: This API element is subject to removal in a future version.
Exists for compatibility with Log4j 2 2.x plugins.
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated, for removal: This API element is subject to removal in a future version.
Exists for compatibility with Log4j 2 2.x plugins.
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated, for removal: This API element is subject to removal in a future version.
Exists for compatibility with Log4j 2 2.x plugins.
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated, for removal: This API element is subject to removal in a future version.
Exists for compatibility with Log4j 2 2.x plugins.
Identifies the current
Configuration
.Deprecated, for removal: This API element is subject to removal in a future version.
Exists for compatibility with Log4j 2 2.x plugins.
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated, for removal: This API element is subject to removal in a future version.
Exists for compatibility with Log4j 2 2.x plugins.
Identifies a parameter or field as a LoggerContext.
Deprecated, for removal: This API element is subject to removal in a future version.
Exists for compatibility with Log4j 2 2.x plugins.
Deprecated, for removal: This API element is subject to removal in a future version.
Exists for compatibility with Log4j 2 2.x plugins.
Deprecated, for removal: This API element is subject to removal in a future version.
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.
A lookup designed for
Properties
defined in the configuration.Handles properties defined in the configuration.
This policy modifies events by replacing or possibly adding keys and values to the MapMessage.
Represents a key/value pair in the configuration.
Assembler for constructing Property Components.
Enumerates the supported protocols.
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.Implemented by Configurations that can be reconfigured at runtime.
This filter returns the onMatch result if the message matches the regular expression.
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.
Looks up keys from resource bundles.
Garbage-free LogEventFactory that recycles mutable
LogEvent
instances.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.
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.
Represents int
Container for javax.script.Bindings.
Assembler for constructing Layout Components.
Interface for the ScriptCondition plugin.
Assembler for constructing ScriptFile Components.
Script Manager.
Interface to create a ScriptManager.
Factory class to provide a
SecretKey
instance.Class Description goes here.
Formats the event sequence number.
Severity values used by the Syslog system.
Registry used for Runnable shutdown callback instances.
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)
.FileVisitor that sorts files.
Represents the source for the logging configuration as an immutable object.
SSL Configuration
Creates an SSL configuration from Log4j properties.
Configuration for setting up
StatusConsoleListener
instances.Specifies how verbose the StatusLogger should be.
Encoder
for StringBuilder
s.Writer
implementation that outputs to a StringBuilder
.Legacy interface from when layouts used to support more than strings or bytes.
This filter returns the onMatch result if the message in the event matches the specified text
exactly.
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.
Filter based on data in a StructuredDataMessage.
Looks up keys from
StructuredDataMessage
log messages.Style pattern converter.
The Syslog Appender.
Formats a log event as a BSD Log record.
Builds a SyslogLayout.
Implementation of the
NanoClock
interface that returns the system nano time.Looks up keys from system properties.
Condition that determines if the specified property is set.
Manager of TCP Socket connections.
TcpSocketManager.TcpSocketManagerFactory<M extends TcpSocketManager,T extends org.apache.logging.log4j.core.net.TcpSocketManager.FactoryData>
Factory to create a TcpSocketManager.
Helper class to encode text to binary data without allocating temporary objects.
Renders an input to an output.
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.
Filter based on a value in the Thread Context Map (MDC).
Formats the event thread ID.
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.Helps with Throwable objects.
Rolls a file over based on time.
Filters events that fall within a specified time period in each day.
Wraps messages that are formatted according to RFC 5425.
Utility class for transforming strings.
A
TriggeringPolicy
controls the conditions under which rollover
occurs.Configuration of the TrustStore
Utility class for working with Java
Type
s and derivatives.Converts values to upper case.
Creates configuration from an
URI
.Constructs an HTTPURLConnection.
Formats the event sequence number.
Generates a unique ID.
VariablesNotEmpty pattern converter.
Watches for changes in a Source and performs an action when it is modified.
Creates Watchers of various types.
Manages
FileWatcher
s.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.