Package org.apache.logging.log4j.core.layout
Log4j 2 Layout support.
Layout
plugins should use the
plugin category
Core
and the
element type
layout
.-
Interface Summary Interface Description AbstractStringLayout.Serializer AbstractStringLayout.Serializer2 Variation ofAbstractStringLayout.Serializer
that avoids allocating temporary objects.ByteBufferDestination ByteBufferDestination is the destination thatEncoder
s write binary data to.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.PatternLayout.PatternSerializer PatternSelector Allows different patterns to be used with the PatternLayout based on some selection criteria. -
Class Summary Class Description AbstractCsvLayout A superclass for Comma-Separated Value (CSV) layouts.AbstractJacksonLayout AbstractJacksonLayout.Builder<B extends AbstractJacksonLayout.Builder<B>> AbstractJacksonLayout.LogEventWithAdditionalFields AbstractJacksonLayout.ReadOnlyLogEventWrapper AbstractJacksonLayout.ResolvableKeyValuePair AbstractLayout<T extends java.io.Serializable> Abstract base class for Layouts.AbstractLayout.Builder<B extends AbstractLayout.Builder<B>> Subclasses can extend this abstract Builder.AbstractStringLayout Abstract base class for Layouts that result in a String.AbstractStringLayout.Builder<B extends AbstractStringLayout.Builder<B>> ByteBufferDestinationHelper Helper class for ByteBufferDestination implementors.CsvLogEventLayout A Comma-Separated Value (CSV) layout to log events.CsvParameterLayout A Comma-Separated Value (CSV) layout to log event parameters.GelfLayout Lays out events in the Graylog Extended Log Format (GELF) 1.1.GelfLayout.Builder<B extends GelfLayout.Builder<B>> HtmlLayout Outputs events as rows in an HTML table on an HTML page.HtmlLayout.Builder JacksonFactory JacksonFactory.JSON JacksonFactory.Log4jXmlPrettyPrinter When <Event>s are written into a XML file; the "Event" object is not the root element, but an element named <Events> created usingXmlLayout.getHeader()
andXmlLayout.getFooter()
methods.JacksonFactory.XML JacksonFactory.YAML JsonLayout Note: The JsonLayout should be considered to be deprecated.JsonLayout.Builder<B extends JsonLayout.Builder<B>> LevelPatternSelector Selects the pattern to use based on the Level in the LogEvent.LevelPatternSelector.Builder Custom MarkerPatternSelector builder.LockingStringBuilderEncoder Encoder for StringBuilders that locks on the ByteBufferDestination.LoggerFields A LoggerFields container.MarkerPatternSelector Selects the pattern to use based on the Marker in the LogEvent.MarkerPatternSelector.Builder Custom MarkerPatternSelector builder.MessageLayout PatternLayout A flexible layout configurable with pattern string.PatternLayout.Builder Custom PatternLayout builder.PatternLayout.NoFormatPatternSerializer PatternLayout.PatternFormatterPatternSerializer PatternLayout.PatternSelectorSerializer PatternLayout.PatternSerializerWithReplacement PatternLayout.SerializerBuilder PatternMatch PatternMatch configuration item.PatternMatch.Builder Rfc5424Layout Formats a log event in accordance with RFC 5424.ScriptPatternSelector Selects the pattern to use based on the result of executing a Script.ScriptPatternSelector.Builder Custom ScriptPatternSelector builder.SerializedLayout Deprecated. Java Serialization has inherent security weaknesses, see https://www.owasp.org/index.php/Deserialization_of_untrusted_data .StringBuilderEncoder Encoder for StringBuilders that uses ThreadLocals to avoid locking as much as possible.SyslogLayout Formats a log event as a BSD Log record.SyslogLayout.Builder<B extends SyslogLayout.Builder<B>> Builds a SyslogLayout.TextEncoderHelper Helper class to encode text to binary data without allocating temporary objects.XmlLayout Appends a series ofevent
elements as defined in the log4j.dtd.XmlLayout.Builder<B extends XmlLayout.Builder<B>> YamlLayout Appends a series of YAML events as strings serialized as bytes.YamlLayout.Builder<B extends YamlLayout.Builder<B>> -
Enum Summary Enum Description GelfLayout.CompressionType HtmlLayout.FontSize Possible font sizes