Class SerializedLayout
java.lang.Object
org.apache.logging.log4j.core.layout.AbstractLayout<LogEvent>
org.apache.logging.log4j.core.layout.SerializedLayout
@Deprecated
@Plugin(name="SerializedLayout",
category="Core",
elementType="layout",
printObject=true)
public final class SerializedLayout
extends AbstractLayout<LogEvent>
Deprecated.
Formats a
LogEvent
in its Java serialized form.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.logging.log4j.core.layout.AbstractLayout
AbstractLayout.Builder<B extends AbstractLayout.Builder<B>>
-
Field Summary
Fields inherited from class org.apache.logging.log4j.core.layout.AbstractLayout
configuration, eventCount, footer, header, LOGGER
Fields inherited from interface org.apache.logging.log4j.core.Layout
ELEMENT_TYPE
-
Method Summary
Modifier and TypeMethodDescriptionstatic SerializedLayout
Deprecated.Deprecated.SerializedLayout returns a binary stream.byte[]
Deprecated.Returns the header, if one is available.byte[]
toByteArray
(LogEvent event) Deprecated.Formats aLogEvent
as a serialized byte array of the LogEvent object.toSerializable
(LogEvent event) Deprecated.Returns the LogEvent.Methods inherited from class org.apache.logging.log4j.core.layout.AbstractLayout
encode, getConfiguration, getContentFormat, getFooter, markEvent
-
Method Details
-
toByteArray
Deprecated.Formats aLogEvent
as a serialized byte array of the LogEvent object.- Parameters:
event
- The LogEvent.- Returns:
- the formatted LogEvent.
-
toSerializable
Deprecated.Returns the LogEvent.- Parameters:
event
- The Logging Event.- Returns:
- The LogEvent.
-
createLayout
Deprecated.Creates a SerializedLayout.- Returns:
- A SerializedLayout.
-
getHeader
public byte[] getHeader()Deprecated.Description copied from class:AbstractLayout
Returns the header, if one is available. -
getContentType
Deprecated.SerializedLayout returns a binary stream.- Returns:
- The content type.
-
JsonLayout
when configured with properties="true". Deprecated since 2.9.