Top Description Methods
org.apache.logging.log4j.message

public Interface MultiformatMessage

extends Message
Known Direct Subinterfaces
org.apache.logging.log4j.util.MultiFormatStringBuilderFormattable

A Message that can render itself in more than one way. The format string is used by the Message implementation as extra information that it may use to help it to determine how to format itself. For example, MapMessage accepts a format of "XML" to tell it to render the Map as XML instead of its default format of {key1="value1" key2="value2"}.

Method Summary

Modifier and TypeMethod and Description
public String[]

Returns:

The supported formats.
getFormats
()

Returns the supported formats.

public String

Returns:

The message String.
getFormattedMessage
(String[]
An array of Strings that provide extra information about how to format the message. Each MultiformatMessage implementation is free to use the provided formats however they choose.
formats
)

Returns the Message formatted as a String.

Inherited from org.apache.logging.log4j.message.Message:
getFormatgetFormattedMessagegetParametersgetThrowable

Method Detail

getFormatsback to summary
public String[] getFormats()

Returns the supported formats.

Returns:String[]

The supported formats.

getFormattedMessageback to summary
public String getFormattedMessage(String[] formats)

Returns the Message formatted as a String.

Parameters
formats:String[]

An array of Strings that provide extra information about how to format the message. Each MultiformatMessage implementation is free to use the provided formats however they choose.

Returns:String

The message String.