Package org.apache.log4j.bridge
Class LayoutAdapter
java.lang.Object
org.apache.log4j.bridge.LayoutAdapter
Class Description goes here.
-
Field Summary
FieldsFields inherited from interface org.apache.logging.log4j.core.Layout
ELEMENT_TYPE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(LogEvent event, ByteBufferDestination destination) Encodes the specified source object to some binary representation and writes the result to the specified destination.Returns a description of the content format.Returns the content type output by this layout.byte[]
Returns the format for the layout format.byte[]
Returns the header for the layout format.byte[]
toByteArray
(LogEvent event) Formats the event suitable for display.toSerializable
(LogEvent event) Formats the event as an Object that can be serialized.
-
Field Details
-
layout
-
-
Constructor Details
-
LayoutAdapter
-
-
Method Details
-
getHeader
public byte[] getHeader()Description copied from interface:Layout
Returns the header for the layout format. -
toByteArray
Description copied from interface:Layout
Formats the event suitable for display.- Specified by:
toByteArray
in interfaceLayout<String>
- Parameters:
event
- The Logging Event.- Returns:
- The formatted event.
-
toSerializable
Description copied from interface:Layout
Formats the event as an Object that can be serialized.- Specified by:
toSerializable
in interfaceLayout<String>
- Parameters:
event
- The Logging Event.- Returns:
- The formatted event.
-
getContentType
Description copied from interface:Layout
Returns the content type output by this layout. The base class returns "text/plain".- Specified by:
getContentType
in interfaceLayout<String>
- Returns:
- the content type.
-
getContentFormat
Description copied from interface:Layout
Returns a description of the content format.- Specified by:
getContentFormat
in interfaceLayout<String>
- Returns:
- a Map of key/value pairs describing the Layout-specific content format, or an empty Map if no content format descriptors are specified.
-
encode
Description copied from interface:Encoder
Encodes the specified source object to some binary representation and writes the result to the specified destination.