Package org.apache.log4j.bridge
Class LayoutAdapter
- java.lang.Object
-
- org.apache.log4j.bridge.LayoutAdapter
-
-
Field Summary
-
Fields inherited from interface org.apache.logging.log4j.core.Layout
ELEMENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description LayoutAdapter(Layout layout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencode(LogEvent event, ByteBufferDestination destination)Encodes the specified source object to some binary representation and writes the result to the specified destination.Map<String,String>getContentFormat()Returns a description of the content format.StringgetContentType()Returns the content type output by this layout.byte[]getFooter()Returns the format for the layout format.byte[]getHeader()Returns the header for the layout format.byte[]toByteArray(LogEvent event)Formats the event suitable for display.StringtoSerializable(LogEvent event)Formats the event as an Object that can be serialized.
-
-
-
Constructor Detail
-
LayoutAdapter
public LayoutAdapter(Layout layout)
-
-
Method Detail
-
getFooter
public byte[] getFooter()
Description copied from interface:LayoutReturns the format for the layout format.
-
getHeader
public byte[] getHeader()
Description copied from interface:LayoutReturns the header for the layout format.
-
toByteArray
public byte[] toByteArray(LogEvent event)
Description copied from interface:LayoutFormats the event suitable for display.- Specified by:
toByteArrayin interfaceLayout<String>- Parameters:
event- The Logging Event.- Returns:
- The formatted event.
-
toSerializable
public String toSerializable(LogEvent event)
Description copied from interface:LayoutFormats the event as an Object that can be serialized.- Specified by:
toSerializablein interfaceLayout<String>- Parameters:
event- The Logging Event.- Returns:
- The formatted event.
-
getContentType
public String getContentType()
Description copied from interface:LayoutReturns the content type output by this layout. The base class returns "text/plain".- Specified by:
getContentTypein interfaceLayout<String>- Returns:
- the content type.
-
getContentFormat
public Map<String,String> getContentFormat()
Description copied from interface:LayoutReturns a description of the content format.- Specified by:
getContentFormatin 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
public void encode(LogEvent event, ByteBufferDestination destination)
Description copied from interface:EncoderEncodes the specified source object to some binary representation and writes the result to the specified destination.
-
-