Package co.elastic.logging.log4j2
Class EcsLayout
- java.lang.Object
-
- org.apache.logging.log4j.core.layout.AbstractLayout<String>
-
- org.apache.logging.log4j.core.layout.AbstractStringLayout
-
- co.elastic.logging.log4j2.EcsLayout
-
- All Implemented Interfaces:
org.apache.logging.log4j.core.impl.LocationAware,org.apache.logging.log4j.core.Layout<String>,org.apache.logging.log4j.core.layout.Encoder<org.apache.logging.log4j.core.LogEvent>,org.apache.logging.log4j.core.StringLayout
@Plugin(name="EcsLayout", category="Core", elementType="layout") public class EcsLayout extends org.apache.logging.log4j.core.layout.AbstractStringLayout
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEcsLayout.Builder
-
Field Summary
Fields Modifier and Type Field Description static CharsetUTF_8-
Fields inherited from class org.apache.logging.log4j.core.layout.AbstractLayout
configuration, eventCount, footer, header, LOGGER
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencode(org.apache.logging.log4j.core.LogEvent event, org.apache.logging.log4j.core.layout.ByteBufferDestination destination)StringgetContentType()static EcsLayout.BuildernewBuilder()StringtoSerializable(org.apache.logging.log4j.core.LogEvent event)-
Methods inherited from class org.apache.logging.log4j.core.layout.AbstractLayout
getConfiguration, getContentFormat, markEvent
-
-
-
-
Field Detail
-
UTF_8
public static final Charset UTF_8
-
-
Method Detail
-
newBuilder
@PluginBuilderFactory public static EcsLayout.Builder newBuilder()
-
toSerializable
public String toSerializable(org.apache.logging.log4j.core.LogEvent event)
-
encode
public void encode(org.apache.logging.log4j.core.LogEvent event, org.apache.logging.log4j.core.layout.ByteBufferDestination destination)- Specified by:
encodein interfaceorg.apache.logging.log4j.core.layout.Encoder<org.apache.logging.log4j.core.LogEvent>- Overrides:
encodein classorg.apache.logging.log4j.core.layout.AbstractLayout<String>
-
-