@Plugin(name="SerializedLayout", category="Core", elementType="layout", printObject=true) public final class SerializedLayout extends AbstractLayout<LogEvent>
LogEvent in its Java serialized form.| Modifier and Type | Class and Description |
|---|---|
private class |
SerializedLayout.PrivateObjectOutputStream
The stream header will be written in the Manager so skip it here.
|
AbstractLayout.Builder<B extends AbstractLayout.Builder<B>>| Modifier and Type | Field and Description |
|---|---|
private static byte[] |
serializedHeader |
configuration, eventCount, footer, header, LOGGERELEMENT_TYPE| Modifier | Constructor and Description |
|---|---|
private |
SerializedLayout() |
| Modifier and Type | Method and Description |
|---|---|
static SerializedLayout |
createLayout()
Creates a SerializedLayout.
|
java.lang.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, writeTopublic 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()
AbstractLayoutpublic java.lang.String getContentType()