Package org.apache.logging.log4j.message
Public Message Types used for Log4j 2. Users may implement their own Messages.
-
Interface Summary Interface Description Clearable Clearable
objects may be reset to a reusable state.EntryMessage Entry flow messagesExitMessage Exit flow messagesFlowMessage Flow messagesFlowMessageFactory Creates flow messages.LoggerNameAwareMessage Message that is interested in the name of the Logger.Message An interface for various Message implementations that can be logged.MessageCollectionMessage<T> A Message that is a collection of Messages.MessageFactory Creates messages.MessageFactory2 Creates messages.MultiformatMessage A Message that can render itself in more than one way.ParameterConsumer<S> An operation that accepts two input arguments and returns no result.ParameterVisitable Allows message parameters to be iterated over without any allocation or memory copies.ReusableMessage Messages implementing this interface are reused between logging calls.ThreadDumpMessage.ThreadInfoFactory Factory to create Thread information.ThreadInformation Interface used to print basic or extended thread information.TimestampMessage Messages that use this interface will cause the timestamp in the message to be used instead of the timestamp in the LogEvent. -
Class Summary Class Description AbstractMessageFactory Provides an abstract superclass forMessageFactory2
implementations with default implementations (and forMessageFactory
by extension).BasicThreadInformation Generates information about the current Thread.DefaultFlowMessageFactory Default factory for flow messages.DefaultFlowMessageFactory.AbstractFlowMessage DefaultFlowMessageFactory.SimpleEntryMessage DefaultFlowMessageFactory.SimpleExitMessage FormattedMessage Handles messages that contain a format String.FormattedMessageFactory LocalizedMessage Provides some level of compatibility with Log4j 1.x and convenience but is not the recommended way to Localize messages.LocalizedMessageFactory MapMessage<M extends MapMessage<M,V>,V> Represents a Message that consists of a Map.MessageFormatMessage Handles messages that consist of a format string conforming to java.text.MessageFormat.MessageFormatMessageFactory ObjectArrayMessage Handles messages that contain an Object[].ObjectMessage Handles messages that contain an Object.ParameterFormatter Supports parameter formatting as used in ParameterizedMessage and ReusableParameterizedMessage.ParameterizedMessage Handles messages that consist of a format string containing '{}' to represent each replaceable token, and the parameters.ParameterizedMessageFactory ParameterizedNoReferenceMessageFactory ParameterizedNoReferenceMessageFactory.StatusMessage 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.ReusableMessageFactory Implementation of theMessageFactory
interface that avoids allocating temporary objects where possible.ReusableObjectMessage Mutable Message wrapper around an Object message.ReusableParameterizedMessage Reusable parameterized message.ReusableSimpleMessage Mutable Message wrapper around a String message.SimpleMessage The simplest possible implementation of Message.SimpleMessageFactory StringFormattedMessage Handles messages that consist of a format string conforming toFormatter
.StringFormatterMessageFactory StringMapMessage AStringMapMessage
typed toString
-only values.StructuredDataCollectionMessage A collection of StructuredDataMessages.StructuredDataId The StructuredData identifier.StructuredDataMessage Represents a Message that conforms to an RFC 5424 StructuredData element along with the syslog message.ThreadDumpMessage Captures information about all running Threads.ThreadDumpMessage.BasicThreadInfoFactory Factory to create basic thread information.ThreadDumpMessage.ThreadDumpMessageProxy Proxy pattern used to serialize the ThreadDumpMessage. -
Enum Summary Enum Description MapMessage.MapFormat When set as the format specifier causes the Map to be formatted as XML.MapMessageJsonFormatter The default JSON formatter forMapMessage
s.StructuredDataMessage.Format Supported formats. -
Annotation Types Summary Annotation Type Description AsynchronouslyFormattable Annotation that signals to asynchronous logging components that messages of this type can safely be passed to a background thread without callingMessage.getFormattedMessage()
first.