@Plugin(name="SerializedLayout", category="Core", elementType="layout", printObject=true) public final class SerializedLayout extends AbstractLayout<LogEvent>
LogEvent
in its Java serialized form.AbstractLayout.Builder<B extends AbstractLayout.Builder<B>>
configuration, eventCount, footer, header, LOGGER
ELEMENT_TYPE
Modifier and Type | Method and Description |
---|---|
static SerializedLayout |
createLayout()
Creates a SerializedLayout.
|
String |
getContentType()
SerializedLayout returns a binary stream.
|
byte[] |
getHeader()
Returns the header, if one is available.
|
byte[] |
toByteArray(LogEvent event)
Formats a
LogEvent as a serialized byte array of the LogEvent object. |
LogEvent |
toSerializable(LogEvent event)
Returns the LogEvent.
|
encode, getConfiguration, getContentFormat, getFooter, markEvent, writeTo
public byte[] toByteArray(LogEvent event)
LogEvent
as a serialized byte array of the LogEvent object.event
- The LogEvent.public LogEvent toSerializable(LogEvent event)
event
- The Logging Event.@PluginFactory public static SerializedLayout createLayout()
public byte[] getHeader()
AbstractLayout
public String getContentType()
Copyright © 1999-2017. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.