Class MessageLayout
java.lang.Object
org.apache.logging.log4j.core.layout.AbstractLayout<Message>
org.apache.logging.log4j.core.layout.MessageLayout
@Plugin(name="MessageLayout",
category="Core",
elementType="layout",
printObject=true)
public class MessageLayout
extends AbstractLayout<Message>
Formats a
LogEvent in its Message form.
Useful in combination with a JMS Appender to map a Log4j MapMessage or
StringMapMessage to a JMS MapMessage.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractLayout
AbstractLayout.Builder<B> -
Field Summary
Fields inherited from class AbstractLayout
configuration, eventCount, footer, header, LOGGERFields inherited from interface Layout
ELEMENT_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Layout<?> Returns the content type output by this layout.byte[]toByteArray(LogEvent event) Formats the event suitable for display.toSerializable(LogEvent event) Formats the event as an Object that can be serialized.Methods inherited from class AbstractLayout
encode, getConfiguration, getContentFormat, getFooter, getHeader, markEvent
-
Constructor Details
-
MessageLayout
public MessageLayout() -
MessageLayout
-
-
Method Details
-
toByteArray
-
toSerializable
-
getContentType
-
createLayout
-