Package org.apache.logging.log4j.core.layout
@Export
@Version("2.24.0")
package org.apache.logging.log4j.core.layout
Log4j 2 Layout support.
Layout
plugins should use the
plugin category
Core
and the
element type
layout
.-
ClassDescriptionA superclass for Comma-Separated Value (CSV) layouts.AbstractLayout<T extends Serializable>Abstract base class for Layouts.AbstractLayout.Builder<B extends AbstractLayout.Builder<B>>Subclasses can extend this abstract Builder.Abstract base class for Layouts that result in a String.AbstractStringLayout.Builder<B extends AbstractStringLayout.Builder<B>>Variation of
AbstractStringLayout.Serializer
that avoids allocating temporary objects.ByteBufferDestination is the destination thatEncoder
s write binary data to.Helper class for ByteBufferDestination implementors.A Comma-Separated Value (CSV) layout to log events.A Comma-Separated Value (CSV) layout to log event parameters.Encoder<T>Objects implementing theEncoder
interface know how to convert an object to some binary representation and write the result to aByteBuffer
, ideally without creating temporary objects.Lays out events in the Graylog Extended Log Format (GELF) 1.1.GelfLayout.Builder<B extends GelfLayout.Builder<B>>Outputs events as rows in an HTML table on an HTML page.Possible font sizesNote: The JsonLayout should be considered to be deprecated.JsonLayout.Builder<B extends JsonLayout.Builder<B>>Selects the pattern to use based on the Level in the LogEvent.Custom MarkerPatternSelector builder.Encoder for StringBuilders that locks on the ByteBufferDestination.A LoggerFields container.Selects the pattern to use based on the Marker in the LogEvent.Custom MarkerPatternSelector builder.A flexible layout configurable with pattern string.Custom PatternLayout builder.PatternMatch configuration item.Allows different patterns to be used with the PatternLayout based on some selection criteria.Formats a log event in accordance with RFC 5424.Selects the pattern to use based on the result of executing a Script.Custom ScriptPatternSelector builder.Deprecated.Java Serialization has inherent security weaknesses, see https://www.owasp.org/index.php/Deserialization_of_untrusted_data .Encoder for StringBuilders that uses ThreadLocals to avoid locking as much as possible.Formats a log event as a BSD Log record.SyslogLayout.Builder<B extends SyslogLayout.Builder<B>>Builds a SyslogLayout.Helper class to encode text to binary data without allocating temporary objects.Appends a series ofevent
elements as defined in the Log4j-events.xsd.XmlLayout.Builder<B extends XmlLayout.Builder<B>>Appends a series of YAML events as strings serialized as bytes.YamlLayout.Builder<B extends YamlLayout.Builder<B>>