All Classes and Interfaces
Class
Description
Formats a
Date
in the format "HH:mm:ss,SSS" for example, "15:49:37,459".Abstract base class for implementations of Action.
Abstract base class for Appenders.
Subclasses can extend this abstract Builder.
Default disruptor exception handler for errors that occur in the AsyncLogger background thread.
Base class for Log4j 1 component builders.
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)
.AbstractDriverManagerConnectionSource.Builder<B extends AbstractDriverManagerConnectionSource.Builder<B>>
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.
Abstract Logger registry.
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.
Marks classes that implement ANSI escape code conversions.
Converts text into ANSI escape sequences.
Log4j API implementation of the JUL
Logger
class.Logger
registry implementation using just log4j-api.Implement this interface for your own strategies for outputting log
statements.
Appends
LogEvent
s.Binds a Log4j 1.x Appender to Log4j 2.
Implementation of the
AppenderAdminMBean
interface.The MBean interface for monitoring and managing an
Appender
.Interface for attaching appenders to objects.
Allows Classes to attach Appenders.
Define an Appender Builder.
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.
The base class for Appenders in Log4j 1.
An Appender container.
Wraps a Log4j 2 Appender in an empty Log4j 1 Appender so it can be extracted when constructing the configuration.
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.)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
.Build an Asynch Appender
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.
EventHandler performs 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.
Helper class for async loggers: AsyncLoggerDisruptor handles the mechanics of working with the LMAX Disruptor, and
works with its associated AsyncLoggerContext to synchronize the life cycle of the Disruptor and its thread with the
life cycle of the context.
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.
Base64 encodes Strings.
Returns either this Thread's context or the default
AsyncLoggerContext
.Provides the Basic Authorization header to a request.
Configures the package.
Returns either this Thread's context or the default LoggerContext.
Generates information about the current Thread.
An operation that accepts two input arguments and returns no result.
Factory for creating instances of
BlockingQueue
.Deprecated.
Boolean helpers.
Bounded first-in-first-out buffer.
A marker interface for Log4j 1.x component builders.
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.Delay object to represent each log event that has occurred within the timespan.
ByteBufferDestination is the destination that
Encoder
s 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.CachedDateFormat optimizes the performance of a wrapped
DateFormat.
Interface to cancel a Runnable callback.
Converts the case of string values.
CaseConverterResolver
factory.This class implements the
<log:catching>
tag.Implementation of the Category class for compatibility, despite it having been deprecated a long, long time ago.
CategoryKey is a wrapper for String that apparently accelerated hash table lookup in early JVM's.
Delegates to
Logger
methods implemented by log4j-core
if appropriate.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
.Clearable
objects may be reset to a reusable state.This class allows client-side code to perform operations on remote
(server-side) MBeans via proxies.
Panel for editing Log4j configurations.
Swing GUI that connects to a Java process via JMX and allows the user to view
and modify the Log4j 2 configuration, as well as monitor status logs.
Adapts the
ClientGui
to the JConsolePlugin
API.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.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.
Utility class providing some defensive coding convenience methods.
Inner class to group the built-in
CommandLine.ITypeConverter
implementations.Converts
"true"
or "false"
to a Boolean
.Converts text to a
Byte
by delegating to Byte.valueOf(String)
.Converts text to a
InetAddress
by delegating to InetAddress.getByName(String)
.Converts text to an
Integer
by delegating to Integer.valueOf(String)
.Converts text in
yyyy-mm-dd
format to a java.util.Date
.Converts text in any of the following formats to a
java.sql.Time
: HH:mm
, HH:mm:ss
,
HH:mm:ss.SSS
, HH:mm:ss,SSS
.Converts text to a
Long
by delegating to Long.valueOf(String)
.Converts text to a
Short
by delegating to Short.valueOf(String)
.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.
Defines a palette map of 216 colors: 6 * 6 * 6 cube (216 colors):
16 + 36 * r + 6 * g + b (0 <= r, g, b <= 5).
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.
The DefaultParameterRenderer converts
Parameters
to five columns of text to match the
default TextTable column layout.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.
The MinimalOptionRenderer converts
Options
to a single row with two columns of text: an
option name and a description.The MinimalParameterRenderer converts
Parameters
to a single row with two columns of
text: the parameters label and a description.Sorts short strings before longer strings.
Sorts
Option
instances by their max arity first, then their min arity, then delegates to super class.Sorts
Option
instances by their name in case-insensitive alphabetic order.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.Default Factory.
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.
RuntimeStrSubstitutor
is a StrSubstitutor
which only supports recursive evaluation of lookups.Log4j 1.x Configurator interface.
Initializes and configure the Logging system.
Configuration element for
JdbcAppender
.Placeholder for Log4j 1.2 Console Appender.
Appends log events to
System.out
or System.err
using a layout specified by the user.Builds ConsoleAppender instances.
Factory to create the Appender.
Data to pass to factory method.Unable to instantiate
An implementation of OutputStream that redirects to the current System.err.
An implementation of OutputStream that redirects to the current System.out.
Enumeration of console destinations.
Build a Console Appender
Constants used internally throughout log4j.
Log4j Constants.
Constants for the JUL adapter.
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.Definition of a Docker Container
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
.Delegates to
LoggerContext
methods implemented by log4j-core
if appropriate.Identifies the keys that are associated with a PatternConverter.
Marker interface indicating that the implementing class is a copy-on-write data structure.
SortedArrayStringMap
-based implementation of the ThreadContextMap
interface that creates a copy of
the data structure on every modification.Log4j Core implementation of the JUL
Logger
class.Logger
registry implementation that uses log4j-core.The Apache CouchDB implementation of
NoSqlConnection
.The Apache CouchDB implementation of
NoSqlProvider
.Resolves a number from an internal counter.
CounterResolver
factory.No-Operation Appender that counts events.
Counts the number of bytes written.
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
.Holds
LoggingEvents
for immediate or differed display.A bounded buffer containing elements of type T.
Build a Daily Rolling File Appender
OutputStream for UDP connections.
Socket Manager for UDP connections.
Factory to create the DatagramSocketManager.
Data for the factory.
A
JdbcAppender
connection source that uses a DataSource
to connect to the database.This abstract layout takes care of all the date related options and formatting work.
Formats the current date or the date in the LogEvent.
DateParser is the "missing" interface for the parsing methods of
DateFormat
.Converts and formats the event's date in a StringBuilder.
DatePrinter is the "missing" interface for the format methods of
DateFormat
.Formats a
Date
in the format "dd MMM yyyy HH:mm:ss,SSS" for example, "06 Nov 1994 15:49:37,459".Utility methods for Date classes.
Wraps a database exception like a JDBC SQLException.
This class implements the
<log:debug>
tag.The default advertiser does not do anything.
Holds the Appender Component attributes and subcomponents.
Holds the Appender Component attributes and subcomponents.
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).
Extends
DefaultComponentBuilder
to specify
DefaultConfigurationBuilder<? extends Configuration>
as the
ConfigurationBuilder
type.DefaultComponentBuilder<T extends ComponentBuilder<T>,CB extends ConfigurationBuilder<? extends Configuration>>
Generic component that captures attributes and Components in preparation for assembling the Appender's
Component.
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.
Default implementation of LevelConverter strategy.
Collects data for a log event and then logs it.
Always creates new LogEvent instances.
Default implementation using the Core LoggerContext.
Default internal implementation of
LookupResult
.The default merge strategy for composite configurations.
Default implementation of
NoSqlObject
.Reliability strategy that assumes reconfigurations will never take place.
The default ObjectRenderer renders objects by calling their
toString()
method.When rolling over,
DefaultRolloverStrategy
renames files according to an algorithm as described below.Builds DefaultRolloverStrategy instances.
Creates a ScriptFile ComponentBuilder.
ShutdownRegistrationStrategy that simply uses
Runtime.addShutdownHook(Thread)
.The actual ThreadContext Map.
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.Default implementation of
ThrowableRenderer
using Throwable.printStackTrace(PrintWriter)
.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.
Denies all logging events.
This filter causes all logging events to be dropped.
Build a Pattern Layout
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.
Utility methods for getting Disruptor related configuration.
Lookups up keys for for a Docker container.
Use this class to initialize the log4j environment using a DOM tree.
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.This class implements the
<log:dump>
tag.Simplified implementation of the ISO-8601 Durations
standard.
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.
endOfBatch
indicator resolver.EndOfBatchResolver
factory.Consider this class private.
Entry flow messages
This class implements the
<log:entry>
tag.Looks up keys from environment variables.
PasswordProvider implementation that obtains the password value from a system environment variable.
PropertySource implementation that uses environment variables as a source.
Equals pattern converter.
Equals ignore case pattern converter.
Equals pattern converter.
This interface defines commonly encoutered error codes.
Appenders may delegate their error handling to
ErrorHandlers
.Appenders may delegate their error handling to
ErrorHandlers
.Makes a Log4j 1 ErrorHandler usable by a Log4j 2 Appender.
This class implements the
<log:error>
tag.Interceptor to add
additional fields
after event template read.Logs "Events" that are represented as
StructuredDataMessage
.Looks up values from the log event.
TemplateResolver
specialized for LogEvent
s.TemplateResolverContext
specialized for LogEvent
s.Utility class for
EventResolverFactory
.TemplateResolverFactory
specialized for LogEvent
s.TemplateResolverInterceptor
specialized for LogEvent
s.Utility class for
EventResolverInterceptor
.TemplateResolverStringSubstitutor
specialized for LogEvent
s.Interceptor to add a root object key to the event template.
Enumeration over the different destinations where a log event can be sent.
Implements common methods for all logging tags that accept exceptions.
Exception resolver.
ExceptionResolver
factory.Exception root cause resolver.
ExceptionRootCauseResolver
factory.Excludes the listed keys.
Exit flow messages
This class implements the
<log:exit>
tag.Class and package data used with a
StackTraceElement
in a ExtendedStackTraceElement
.Extends the
Logger
interface with methods that facilitate implementing or extending Logger
s.Wrapper around
Generate.ExtendedLogger
.Wrapper class that exposes the protected AbstractLogger methods to support wrapped loggers.
Wraps and extends the concept of the JRE's final class
StackTraceElement
by adding more location information.Mix-in for
ExtendedStackTraceElement
.Factory to create extended thread information.
Provides information on locks and monitors in the thread dump.
Outputs the Throwable portion of the LoggingEvent as a full stack trace
unless this converter's option is 'short', where it just outputs the first line of the trace, or if
the number of lines to print is explicitly specified.
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.
An ErrorHandler with a secondary appender.
FastDateFormat is a fast and thread-safe version of
SimpleDateFormat
.FastDateParser is a fast and thread-safe version of
SimpleDateFormat
.A strategy that handles a text field in the parsing pattern
A strategy that copies the static or quoted field in the parsing pattern
A strategy that handles a number field in the parsing pattern
A strategy to parse a single field from the parsing pattern
A strategy to parse a single field from the parsing pattern
Holds strategy and field width
A strategy that handles a timezone field in the parsing pattern
FastDatePrinter is a fast and thread-safe version of
SimpleDateFormat
.Inner class to output a constant single character.
Inner class to output the numeric day in week.
Inner class to output a time zone as a number
+/-HHMM
or +/-HH:MM
.Inner class defining a numeric rule.
Inner class to output a padded number.
Inner class defining a rule.
Inner class to output a constant string.
Inner class to output one of a set of values.
Inner class that acts as a compound key for time zone names.
Inner class to output a time zone name.
Inner class to output a time zone as a number
+/-HHMM
or +/-HH:MM
.Inner class to output the twelve hour field.
Inner class to output the twenty four hour field.
Inner class to output a two digit month.
Inner class to output a two digit number.
Inner class to output a two digit year.
Inner class to output an unpadded month.
Inner class to output an unpadded number.
Inner class to output the numeric day in week.
This class implements the
<log:fatal>
tag.FileAppender appends log events to a file.
File Appender.
Builds FileAppender instances.
Build a File Appender
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.
Factory Data.
Factory to create a FileManager.
PasswordProvider that reads password from a file.
File rename action.
FileSize utility class.
File utilities.
Checks every now and then that a certain file has not changed.
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.
Binds a Log4j 1.x Filter with Log4j 2.
Define a Filter Builder.
Assembler for constructing Filter Components.
Extends
ObjectInputStream
to only allow some built-in Log4j classes and caller-specified classes to be
deserialized.This acts as a container for Log4j 2 Filters to be attached to Log4j 1 components.
Custom time formatter that trades flexibility for performance.
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.
The basic methods for performing date formatting.
FormatCache is a cache and factory for
Format
s.Helper class to hold multi-part Map keys
Handles messages that contain a format String.
FormattingInfo instances contain the information obtained when parsing formatting modifiers in conversion modifiers.
Modifies the output of a pattern converter for a specified minimum and maximum width and alignment.
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.Compresses a file using GZ compression.
Converts Strings to hex.
This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy.
Private LogManager.
Listen to events occurring within a Hierarchy.
Highlight pattern converter.
Deprecated.
Use
AtomicReference
.Outputs events as rows in an HTML table on an HTML page.
Possible font sizes
Build a Pattern Layout
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.This class implements the
<log:ifEnabled>
tag.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.This class implements the
<log:info>
tag.Initialization utils.
Used to set up
Module.SetupContext
from different SimpleModule
s.Used to set up
Module.SetupContext
from different SimpleModule
s.Used to set up
SimpleModule
from different SimpleModule
subclasses.Models a point in time, suitable for event timestamps.
A composite
Instant
formatter trying to employ either
FixedDateFormat
, FastDateFormat
, or DateTimeFormatter
in the given order due to performance reasons.Jackson mix-in for
Instant
.Formats an integer.
Helps deal with integers.
Helper class providing some async logging-related functionality.
Internal class that exists primarly to allow location calculations to work.
Internal class that exists primarly to allow location calculations to work.
Internal class that exists primarly to allow location calculations to work.
Internal class that exists primarily to allow location calculation to work.
Internal class that exists primarily to allow location calculation to work.
Internal class that exists primarily to allow location calculation to work.
Internal class that exists primarily to allow location calculation to work.
Internal class used primarily to allow location calculations to work properly.
Internal class that exists primarly to allow location calculations to work.
Internal class that exists primarly to allow location calculations to work.
Internal class that exists primarly to allow location calculations to work.
Proxies all the other
StrLookup
s.Builder class to wrap
Loggers
into Java IO compatible classes.Copied from Apache Commons IO revision 1686747.
Formats a
Date
in the format "yyyy-MM-dd HH:mm:ss,SSS" for example "1999-11-27 15:49:37,459".When <Event>s are written into a XML file; the "Event" object is not the root element, but an element named
<Events> created using
XmlLayout.getHeader()
and XmlLayout.getFooter()
methods.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
.BlockingQueue wrapper for JCTools multiple producer single consumer array queue.
This Appender writes logging events to a relational database using standard JDBC mechanisms.
An
AbstractDatabaseManager
implementation for relational databases accessed via JDBC.Encapsulates data that
JdbcDatabaseManager.JdbcDatabaseManagerFactory
uses to create managers.Creates managers.
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.
Generic JMS Appender plugin for both queues and topics.
Consider this class private; it is only public for access by integration tests.
Maps JVM input arguments (but not main arguments) using JMX to acquire JVM arguments.
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.
The error that occurred.
Status for recording errors.
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
.A simple JSON parser mapping tokens to basic Java types.
This class is borrowed from Jackson.
A simple JSON writer with support for common Java data types.
Implementation of Log4j
LoggerContext
SPI.Implementation of Log4j
LoggerContextFactory
SPI.Bind the Log4j API to JUL.
Configuration of the KeyStore
Key/Value pair configuration item.
Assembler for constructing KeyValuePair Components.
Utility class for lambda support.
An HostnameVerifier which accepts everything.
Lays out a LogEvent in different formats.
Class Description goes here.
Define a Layout Builder.
Assembler for constructing Layout Components.
Bridge between the Log4j 1 Layout and a Log4j 2 Layout.
Extension of
LogRecord
with lazy get source related methods based on Log4j's StackLocatorUtil.calcLocation(String)
.Defines the minimum set of levels recognized by the system, that is
OFF
, FATAL
, ERROR
,
WARN
, INFO
, DEBUG
and ALL
.Levels used for identifying the severity of an event.
Simple filter based on level matching.
This filter returns the onMatch result if the logging level in the event matches the specified logging level
exactly.
Build a Level match failter.
Jackson mix-in for
Level
.Returns the event's level in a StringBuilder.
Selects the pattern to use based on the Level in the LogEvent.
Custom MarkerPatternSelector builder.
This is a very simple filter based on level matching, which can be used to reject messages with priorities outside a
certain range.
This filter returns the
onMatch
result if the level in the LogEvent
is in the range of the configured
min and max levels, otherwise it returns onMismatch
value .Build a Level match failter.
Level
resolver.LevelResolver
factory.Utility class to convert between JDK Levels and Log4j 2 Levels.
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.
Loads resources (or images) from various sources.
Load resources (or images) from various sources.
Consider this class private. Utility class for ClassLoaders.
URL
and ClassLoader
pair.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.
The internal representation of caller 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.
Class Description goes here.
Tool for converting a Log4j 1.x properties configuration file to Log4j 2.x XML configuration file.
Experimental ConfigurationFactory for Log4j 1.2 properties configuration files.
Experimental parser for Log4j 1.2 properties configuration files.
Able to handle the contents of the LogEvent's MDC and either
output the entire contents of the properties, or to output the value of a specific key
within the property bundle when this pattern converter has the option set.
Returns the event's NDC in a StringBuilder.
Port of XMLLayout in Log4j 1.x.
Bridge from JUL to log4j2.
This is an alternative to log4j.jul.LogManager (running as complete JUL replacement), especially useful for webapps running on a container for which the LogManager cannot or should not be used.
Installation/usage: Declaratively inside JUL's
(and typically also: Â
Note: in a webapp running on Tomcat, you may create a
This is an alternative to log4j.jul.LogManager (running as complete JUL replacement), especially useful for webapps running on a container for which the LogManager cannot or should not be used.
Installation/usage: Declaratively inside JUL's
logging.properties
:handlers = org.apache.logging.log4j.jul.Log4jBridgeHandler
(and typically also: Â
org.apache.logging.log4j.jul.Log4jBridgeHandler.propagateLevels = true
)Note: in a webapp running on Tomcat, you may create a
WEB-INF/classes/logging.properties
file to configure JUL for this webapp only: configured handlers and log levels affect your webapp only!
This file is then the complete JUL configuration, so JUL's defaults (e.g.Factory to locate a ContextSelector and then load a LoggerContext.
An
EntityResolver
specifically designed to return
log4j.dtd
which is embedded within the log4j jar
file.
Consider this class private.
A Jackson JSON
ObjectMapper
initialized for Log4j.Implementation of a LogEvent.
LogEvent Builder helper class.
Proxy pattern used to serialize the LogEvent.
SLF4J logger implementation that uses Log4j.
Log4j implementation of SLF4J ILoggerFactory interface.
Lookup properties of Log4j
Log4j/SLF4J
Marker
type bridge.Log4j/SLF4J bridge to create SLF4J Markers based on name or based on existing SLF4J Markers.
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.
Copy and edit the Jackson (Apache License 2.0) class to use Log4j attribute names.
JPL
logger
implementation that uses Log4j.System.Logger
registry implementation using just log4j-api.The bridge between the tag library and the Log4j API ensures that the source information for log events is
the JSP Servlet and not one of the taglib classes.
This bridge between the tag library and the Log4j API ensures that instances of
Log4jTaglibLogger
are
appropriately held in memory and not constantly recreated.Prefixes thread names with
"Log4j2-"
.Creates
Log4jThread
s.This class initializes and deinitializes Log4j no matter how the initialization occurs.
Specifies an interface for initializing and deinitializing Log4j in a Java EE web application.
Specifies an interface for setting and clearing a thread-bound
LoggerContext
in a Java EE web application.
Consider this class private.
A Jackson XML
ObjectMapper
initialized for Log4j.
Consider this class private.
A Jackson
ObjectMapper
initialized for Log4j.Commons Logging adapter registry.
Interface for constructing log events before logging them.
Provides contextual information about a logged message.
Converts a Log4j 2 LogEvent into the components needed by a Log4j 1.x LoggingEvent.
Base class for server classes that listen to
LogEvent
s.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.
Exposes a Log4j 1 logging event as a Log4j 2 LogEvent.
Log4j binding for Commons Logging.
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.An abstract class for all tags that are logger-aware.
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
.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.
Implement this interface to create new instances of Logger or a sub-class of Logger.
A LoggerFields container.
Logs each line written to a pre-defined level.
Logs each line written to a pre-defined level.
Formats the Logger FQCN.
Logs each line read to a pre-defined level.
Message that is interested in the name of the Logger.
Rewrites log event levels for a given logger name.
Logs each line written to a pre-defined level.
Formats a logger name.
Logs each line written to a pre-defined level.
Logs each line written to a pre-defined level.
Logs each line read to a pre-defined level.
Convenience class to be used by
LoggerContext
implementations.Generates ConcurrentHashMaps for use by the registry to store the Loggers.
Interface to control the data structure used by the registry to store the Loggers.
Generates WeakHashMaps for use by the registry to store the Loggers.
A
LoggerRepository
is used to create and retrieve Loggers
.Logger resolver.
LoggerResolver
factory.Container of Logger objects.
Logs each line written to a pre-defined level.
No-op version of Log4j 1.2 LoggingEvent.
Exception thrown when an error occurs while logging.
Implements common methods for logging tags that accept messages and markers.
Logs statements from within Log4j.
The main entry point to Log4j 1.
Log4j implementation of
LogManager
.The anchor point for the Log4j logging system.
Keeps track of LogManager initialization status;
This class implements the
<log:log>
tag.Converts values to lower case.
PrintWriter-based logging utility for classes too low level to use
StatusLogger
.A map-based lookup for main arguments.
An index-based resolver for the main() method arguments.
MainMapResolver
factory.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.
The default JSON formatter for
MapMessage
s.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.
MapMessage
resolver.MapResolver
factory.This policy rewrites events where the message of the
original event implements java.util.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.
Jackson mix-in for
Marker
.Returns events' full marker string in a StringBuilder.
Selects the pattern to use based on the Marker in the LogEvent.
Custom MarkerPatternSelector builder.
A
Marker
resolver.MarkerResolver
factory.Appends an event's maker name to a StringBuilder.
Max length pattern converter.
This class behaves just like Log4j's MDC would - and so can cause issues with the redeployment of web
applications if the Objects stored in the threads Map cannot be garbage collected.
Bind the ThreadContextMap to the SLF4J MDC.
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.
Factory Data.
Factory to create a MemoryMappedFileManager.
Simple PasswordProvider implementation that keeps the password char[] array in memory.
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.
Message
parameter (i.e., Message.getParameters()
) resolver.MessageParameterResolver
factory.Returns the event's rendered message in a StringBuilder.
Log4j 1.x JMS Message Renderer
Message
resolver.
Consider this class private.
Classes implementing this interface know how to supply
Message
s.Returns the event's line location information in a StringBuilder.
Builder for
MimeMessage
instances.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
Consider this class private.
NameAbbreviator generates abbreviated logger and class names.
NameAbbreviator generates abbreviated logger and class names.
Abbreviator that drops starting path elements.
Abbreviator that drops starting path elements.
Abbreviator that drops starting path elements.
When the name is reduced in length by cutting parts, there can be two ways to do it.
Abbreviator that simply appends full name to buffer.
Abbreviator that simply appends full name to buffer.
Pattern abbreviator.
Pattern abbreviator.
Fragment of an pattern abbreviator.
Fragment of an pattern abbreviator.
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.
This class does not use generics to provide better source compatibility.
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.
Dummy version of a java.util.Logger.
ThreadContextMap
implementation used when either of system properties disableThreadContextMap
or .No-operation implementation of Logger used by NOPLoggerRepository.
No-operation implementation of LoggerRepository which is used when LogManager.repositorySelector is erroneously
nulled during class reloading.
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.Encapsulates data that
NoSqlDatabaseManager.NoSQLDatabaseManagerFactory
uses to create managers.Creates managers.
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.).A NullAppender never outputs a message to any device.
An Appender that ignores log events.
Build a Null Appender
This configuration defaults to no logging.
An always-empty Enumerator.
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.
Consider this class private.
Converts objects to Strings.
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.
A convenience class to convert property values to specific types.
Log4j 1 Interface for dealing with configuration.
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.
Holds data to pass to factory method.
Creates the manager.
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.
Supports parameter formatting as used in ParameterizedMessage and ReusableParameterizedMessage.
Handles messages that consist of a format string containing '{}' to represent each replaceable token, and
the parameters.
Message implementation that only keeps a reference to the error text and the error (if any), not to the
message parameters, in order to avoid memory leaks.
Allows message parameters to be iterated over without any allocation
or memory copies.
Thrown when the input cannot be parsed.
Parses DOM and properties.
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.PatternConverter is an abtract class that provides the
formatting functionality that derived classes need.
Interface that all PatternConverters must implement.
A flexible layout configurable with pattern string.
Custom PatternLayout builder.
Build a Pattern Layout
PatternMatch configuration item.
Most of the work of the
PatternLayout
class is delegated to the PatternParser class.Most of the work of the
PatternLayout
class is delegated to the
PatternParser class.The states the parser can be in while parsing the pattern.
Parses the rollover pattern.
Resolver delegating to
PatternLayout
.PatternResolver
factory.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.
Loads and manages all the plugins.
Identifies a Plugin configuration Node.
PluginVisitor implementation for
PluginNode
.Annotation processor for pre-scanning Log4j 2 plugins.
ElementVisitor to scan the PluginAliases annotation.
ElementVisitor to scan the Plugin annotation.
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.Refrain from using this class directly, use
the
Level
class instead.The Priority used in the Syslog system.
Internal utility to share a fast implementation of
#getCurrentStackTrace()
with the java 9 implementation of StackLocator
.Constructs a configuration based on Log4j 1 properties.
Configuration created from a properties file.
Helper builder for parsing properties files into a PropertiesConfiguration.
Configures Log4j from a log4j 1 format properties file.
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.
Provides support for looking up global configuration properties via environment variables, property files,
and system properties, in three variations:
Represents a key/value pair in the configuration.
Assembler for constructing Property Components.
Configures Log4j from properties.
PropertySource backed by a properties file.
This policy rewrites events by adding
a user-specified list of properties to the event.
General purpose Object property setter.
Thrown when an error is encountered whilst attempting to set a property
using the
PropertySetter
utility class.A source for global configuration properties.
Comparator for ordering PropertySource instances by priority.
Utility methods useful for PropertySource implementations.
Enumerates the supported protocols.
Model class for a Log4j 2 provider.
Consider this class private. Utility class for Log4j
Provider
s.Policy for purging routed appenders
QuietWriter does not throw exceptions when things go
wrong.
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.Factory Data.
Factory to create a RandomAccessFileManager.
A read-only collection of String keys mapped to values of arbitrary type.
ReadOnlyStringMap
resolver.Read-only view of the data structure that implements MDC behavior for
ThreadContext
.Implemented by Configurations that can be reconfigured at runtime.
The default string (i.e., recycler factory spec) to
RecyclerFactory
type converter.Utility class for performing common reflective operations.
This filter returns the onMatch result if the message matches the regular expression.
Replace tokens in the LogEvent message.
Replacement pattern converter.
Formats a
Date
by printing the number of milliseconds elapsed since construction of the format.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.
Implements object rendering for Log4j 1.x compatibility.
Map class objects to an
ObjectRenderer
.Equals pattern converter.
The
LogManager
uses one (and only one) RepositorySelector
implementation to select the
LoggerRepository
for a particular application context.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.
Build an Asynch Appender
This interface is implemented to provide a rewrite
strategy for RewriteAppender.
Interface to be implemented by components that support modifications to the LogEvent.
Binds a Log4j 1.x RewritePolicy to Log4j 2.
Define a RewritePolicy Builder.
Binds a Log4j 2 RewritePolicy to Log4j 1.
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.
Creates the events that will be put in the RingBuffer.
This event handler gets passed messages from the RingBuffer as they become
available.
This class is responsible for writing elements that make up a log event into
the ringbuffer
RingBufferLogEvent
.RollingFileAppender extends FileAppender to backup the log files when they reach a certain size.
An appender that writes to files and can roll over at intervals.
Builds FileAppender instances.
Build a File Appender
The Rolling File Manager.
Performs actions asynchronously.
Factory data.
Factory to create a RollingFileManager.
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.Factory data.
Factory to create a RollingRandomAccessFileManager.
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.RootLogger sits at the top of the logger hierarchy.
Assembler for constructing the root Logger Components.
Outputs the Throwable portion of the LoggingEvent as a full stack trace
unless this converter's option is 'short', where it just outputs the first line of the trace, or if
the number of lines to print is explicitly specified.
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.
LOG4J2-2629: PurgePolicy implementations can invoke
RoutingAppender.deleteAppender(String)
after we have looked up
an instance of a target appender but before events are appended, which could result in events not being
recorded to any appender.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.
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.
Logs using the ServletContext's log method
This class implements the
<log:setLogger>
tag.Severity values used by the Syslog system.
Registry used for Runnable shutdown callback instances.
Simple-layout.
Build a Pattern Layout
Formats a string literal without substitution.
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.
Exception thrown when the SLF4J adapter encounters a problem.
Bind the Log4j API to SLF4J.
Send an e-mail when a specific logging event occurs, typically on errors or
fatal errors.
Manager for sending SMTP events.
Factory data.
Factory to create the SMTP Manager.
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.
Build a Console Appender
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.
Resolver for the
StackTraceElement
returned by LogEvent.getSource()
.SourceResolver
factory.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.
Jackson mix-in for
StackTraceElement
.StackTraceElement
resolver.TemplateResolverContext
specialized for StackTraceElement
s.StackTraceElementResolver
factory.TemplateResolverStringSubstitutor
specialized for StackTraceElement
s.Exception stack trace to JSON object resolver used by
ExceptionResolver
.TemplateResolver
specialized for Throwable
s.Exception stack trace to JSON string resolver used by
ExceptionResolver
.Standard Logging Levels as an enumeration for use internally.
SLF4J LoggerFactoryBinder implementation using Log4j.
SLF4J MarkerFactoryBinder implementation using Log4j.
Configuration for setting up
StatusConsoleListener
instances.Specifies how verbose the StatusLogger should be.
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.
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 @{link 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.Simple filter based on string matching.
This filter returns the onMatch result if the logging level in the event matches the specified logging level
exactly.
Build a String match filter.
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.
Class used to define a character for matching purposes.
Class used to define a set of characters for matching purposes.
Class used to match no characters.
Class used to define a set of characters for matching purposes.
Class used to match whitespace as per trim().
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.
The Syslog Appender.
Build a File 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.
Provides support for logging tags.
Manager of TCP Socket connections.
Data for the factory.
TcpSocketManager.TcpSocketManagerFactory<M extends TcpSocketManager,T extends TcpSocketManager.FactoryData>
Factory to create a TcpSocketManager.
Accessor to the resolver configuration JSON object read from the template.
Context used to compile a template and passed to
template resolver factory creator
s.Utility class for
TemplateResolverFactory
.TemplateResolver
factory.Main
TemplateResolver
compilation interception interface.Utility class for
TemplateResolverInterceptor
.Main class for compiling
TemplateResolver
s from a template.A contextual
StrSubstitutor
abstraction.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.
An empty iterator.
An empty read-only ThreadContextStack.
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.
Mapped Diagnostic Context (MDC), aka.
ThreadContextDataResolver
factory.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
.Nested Diagnostic Context (NDC), aka.
ThreadContextStackResolver
factory.Captures information about all running Threads.
Factory to create basic thread information.
Proxy pattern used to serialize the ThreadDumpMessage.
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.
Thread resolver.
ThreadResolver
factory.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.Log4j's internal representation of throwables.
Outputs the Throwable portion of the LoggingEvent as a full stack trace
unless this converter's option is 'short', where it just outputs the first line of the trace, or if
the number of lines to print is explicitly specified.
Wraps a Throwable to add packaging information about each stack trace element.
ThrowableProxyHelper
provides utilities required to initialize a new ThrowableProxy
instance.Cached StackTracePackageElement and ClassLoader.
Mix-in for
ThrowableProxy
.ThrowableProxyRenderer
is an internal utility providing the code to render a ThrowableProxy
to a StringBuilder
.Mix-in for
ThrowableProxy
.Mix-in for
ThrowableProxy
.Implemented by classes that render instances of java.lang.Throwable (exceptions and errors) into a string
representation.
Implemented by logger repositories that support configurable rendering of Throwables.
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.
Timestamp resolver.
TimestampResolver
factory.Wraps messages that are formatted according to RFC 5425.
This class implements the
<log:trace>
tag.Utility class for transforming strings.
An operation that accepts three input arguments and returns no result.
Implementors decide when to perform an appender specific action.
A
TriggeringPolicy
controls the conditions under which rollover
occurs.Configuration of the TrustStore
Build a Pattern Layout
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[]
.Converts a
String
into an InetAddress
.Returns the given
String
, no conversion takes place.Utility class for working with Java
Type
s and derivatives.Utility for preventing primitive parameter values from being auto-boxed.
State implementation that only puts JDK classes in ThreadLocals, so this is safe to be used from
web applications.
When implemented by an object configured by DOMConfigurator,
the handle method will be called when an unrecognized child
element is encountered.
Converts values to upper case.
Constructs an HTTPURLConnection.
An extension of the Level class that provides support for java.util.logging Levels.
Formats the event sequence number.
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.
Appends logging events to a vector.
This class implements the
<log:warn>
tag.Watches for changes in a Source and performs an action when it is modified.
Creates Watchers of various types.
Manages
FileWatcher
s.Convenience methods for retrieving the
LoggerContext
associated with a
particular ServletContext.Wrapper class to ensure proper FQCN support in Logger calls.
WriterAppender appends log events to a
Writer
or an
OutputStream
depending on the user's choice.Appends log events to a
Writer
.Builds WriterAppender instances.
Holds data to pass to factory method.
Manages a Writer so that it can be shared by multiple Appenders and will
allow appenders to reconfigure without requiring a new writer.
Class Description goes here.
Creates a Node hierarchy from an XML file.
The error that occurred.
Status for recording errors.
Constructs a Configuration usable in Log4j 2 from a Log4j 1 configuration 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.dtd.Build an XML Layout
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.
AtomicReference
.