ELEMENT_TYPE
Modifier and Type | Method and Description |
---|---|
static Layout<?> |
adapt(Layout layout)
Adapts a Log4j 1.x layout into a Log4j 2.x layout.
|
void |
encode(LogEvent event,
ByteBufferDestination destination) |
Map<String,String> |
getContentFormat() |
String |
getContentType() |
byte[] |
getFooter() |
byte[] |
getHeader() |
Layout |
getLayout() |
byte[] |
toByteArray(LogEvent event) |
String |
toSerializable(LogEvent event) |
public static Layout<?> adapt(Layout layout)
LayoutWrapper.adapt(org.apache.logging.log4j.core.Layout)
should
return the original Log4j 2.x layout.layout
- a Log4j 1.x layoutnull
if the parameter is null
public Layout getLayout()
public byte[] toByteArray(LogEvent event)
toByteArray
in interface Layout<String>
public String toSerializable(LogEvent event)
toSerializable
in interface Layout<String>
public String getContentType()
getContentType
in interface Layout<String>
public Map<String,String> getContentFormat()
getContentFormat
in interface Layout<String>
public void encode(LogEvent event, ByteBufferDestination destination)
Copyright © 1999-2022 The 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.