@Plugin(name="SerializedLayout", category="Core", elementType="layout", printObject=true) public final class SerializedLayout extends AbstractLayout<LogEvent>
LogEvent in its Java serialized form.footer, header, LOGGERELEMENT_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.
|
getContentFormat, getFooterpublic 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 String getContentType()
Copyright © 1999-2021 Apache Software Foundation. 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.