Module org.apache.logging.log4j
Package org.apache.logging.log4j.message
Public Message Types used for Log4j 2. Users may implement their own Messages.
-
Interface Summary Interface Description 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 Deprecated. MessageFactory now contains all interface methods.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 Deprecated. MessageFactory has default methods that implement all the methods that were here.DefaultFlowMessageFactory Default factory for flow messages.FormattedMessage Handles messages that contain a format String.FormattedMessageFactory CreatesFormattedMessage
instances forMessageFactory
methods.LocalizedMessage Provides some level of compatibility with Log4j 1.x and convenience but is not the recommended way to Localize messages.LocalizedMessageFactory CreatesFormattedMessage
instances forMessageFactory
methods.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 toMessageFormat
.MessageFormatMessageFactory CreatesFormattedMessage
instances forMessageFactory
methods.ObjectArrayMessage Handles messages that contain an Object[].ObjectMessage Handles messages that contain an Object.ParameterizedMessage Handles messages that consist of a format string containing '{}' to represent each replaceable token, and the parameters.ParameterizedMessageFactory CreatesFormattedMessage
instances forMessageFactory
.ParameterizedNoReferenceMessageFactory CreatesFormattedMessage
instances forMessageFactory
methods.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 CreatesFormattedMessage
instances forMessageFactory
methods.StringFormattedMessage Handles messages that consist of a format string conforming toFormatter
.StringFormatterMessageFactory CreatesFormattedMessage
instances forMessageFactory
methods.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. -
Enum Summary Enum Description MapMessage.MapFormat When set as the format specifier causes the Map to be formatted as XML.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.