@Plugin(name="MessageLayout", category="Core", elementType="layout", printObject=true) public class MessageLayout extends AbstractLayout<Message>
LogEvent in its Message form.
Useful in combination with a JMS Appender to map a Log4j MapMessage or
StringMapMessage to a JMS javax.jms.MapMessage.
AbstractLayout.Builder<B extends AbstractLayout.Builder<B>>configuration, eventCount, footer, header, LOGGERELEMENT_TYPE| Constructor and Description |
|---|
MessageLayout() |
MessageLayout(Configuration configuration,
byte[] header,
byte[] footer) |
| Modifier and Type | Method and Description |
|---|---|
static Layout<?> |
createLayout() |
java.lang.String |
getContentType()
Returns the content type output by this layout.
|
byte[] |
toByteArray(LogEvent event)
Formats the event suitable for display.
|
Message |
toSerializable(LogEvent event)
Formats the event as an Object that can be serialized.
|
encode, getConfiguration, getContentFormat, getFooter, getHeader, markEventpublic MessageLayout()
public MessageLayout(Configuration configuration, byte[] header, byte[] footer)
public byte[] toByteArray(LogEvent event)
Layoutevent - The Logging Event.public Message toSerializable(LogEvent event)
Layoutevent - The Logging Event.public java.lang.String getContentType()
Layout@PluginFactory public static Layout<?> createLayout()