Package org.apache.log4j.bridge
Class LayoutAdapter
java.lang.Object
org.apache.log4j.bridge.LayoutAdapter
Class Description goes here.
-
Field Summary
Fields inherited from interface org.apache.logging.log4j.core.Layout
ELEMENT_TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic Layout<?> Adapts a Log4j 1.x layout into a Log4j 2.x layout.voidencode(LogEvent event, ByteBufferDestination destination) byte[]byte[]byte[]toByteArray(LogEvent event) toSerializable(LogEvent event)
-
Method Details
-
adapt
Adapts a Log4j 1.x layout into a Log4j 2.x layout. Applying this method to the result ofLayoutWrapper.adapt(org.apache.logging.log4j.core.Layout)should return the original Log4j 2.x layout.- Parameters:
layout- a Log4j 1.x layout- Returns:
- a Log4j 2.x layout or
nullif the parameter isnull
-
getLayout
-
getHeader
public byte[] getHeader() -
toByteArray
- Specified by:
toByteArrayin interfaceLayout<String>
-
toSerializable
- Specified by:
toSerializablein interfaceLayout<String>
-
getContentType
- Specified by:
getContentTypein interfaceLayout<String>
-
getContentFormat
- Specified by:
getContentFormatin interfaceLayout<String>
-
encode
-