T
- The Serializable
type returned by toSerializable(LogEvent)
public interface Layout<T extends java.io.Serializable> extends Encoder<LogEvent>
byte[]
byte[]
Since 2.6, Layouts can encode a LogEvent
directly
to a ByteBufferDestination
without creating temporary intermediary objects.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ELEMENT_TYPE
Main plugin element type for
Layout plugins.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
getContentFormat()
Returns a description of the content format.
|
java.lang.String |
getContentType()
Returns the content type output by this layout.
|
byte[] |
getFooter()
Returns the format for the layout format.
|
byte[] |
getHeader()
Returns the header for the layout format.
|
byte[] |
toByteArray(LogEvent event)
Formats the event suitable for display.
|
T |
toSerializable(LogEvent event)
Formats the event as an Object that can be serialized.
|
static final java.lang.String ELEMENT_TYPE
byte[] getFooter()
byte[] getHeader()
byte[] toByteArray(LogEvent event)
event
- The Logging Event.T toSerializable(LogEvent event)
event
- The Logging Event.java.lang.String getContentType()
java.util.Map<java.lang.String,java.lang.String> getContentFormat()