Class AlfJsonLayout

  • 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="AlfJsonLayout",
            category="Core",
            elementType="layout",
            printObject=true)
    public final class AlfJsonLayout
    extends org.apache.logging.log4j.core.layout.AbstractStringLayout
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  AlfJsonLayout.Builder<B extends AlfJsonLayout.Builder<B>>  
      • Nested classes/interfaces inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayout

        org.apache.logging.log4j.core.layout.AbstractStringLayout.Serializer, org.apache.logging.log4j.core.layout.AbstractStringLayout.Serializer2
    • Field Summary

      • Fields inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayout

        DEFAULT_STRING_BUILDER_SIZE, MAX_STRING_BUILDER_SIZE
      • Fields inherited from class org.apache.logging.log4j.core.layout.AbstractLayout

        configuration, eventCount, footer, header, LOGGER
      • Fields inherited from interface org.apache.logging.log4j.core.Layout

        ELEMENT_TYPE
    • Constructor Summary

      Constructors 
      Constructor Description
      AlfJsonLayout​(org.apache.logging.log4j.core.config.Configuration config, Charset aCharset, org.apache.logging.log4j.core.layout.AbstractStringLayout.Serializer headerSerializer, org.apache.logging.log4j.core.layout.AbstractStringLayout.Serializer footerSerializer, DateFormat dateFormat, boolean threadPrinting, boolean levelPrinting, boolean loggerPrinting, boolean contextPrinting, String messageKey)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static <B extends AlfJsonLayout.Builder<B>>
      B
      newBuilder()  
      String toSerializable​(org.apache.logging.log4j.core.LogEvent event)  
      • Methods inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayout

        getBytes, getCharset, getContentType, getFooter, getFooterSerializer, getHeader, getHeaderSerializer, getStringBuilder, getStringBuilderEncoder, requiresLocation, serializeToBytes, serializeToString, toByteArray, trimToMaxSize
      • Methods inherited from class org.apache.logging.log4j.core.layout.AbstractLayout

        encode, getConfiguration, getContentFormat, markEvent
      • Methods inherited from interface org.apache.logging.log4j.core.layout.Encoder

        encode
      • Methods inherited from interface org.apache.logging.log4j.core.Layout

        getContentFormat
    • Constructor Detail

      • AlfJsonLayout

        public AlfJsonLayout​(org.apache.logging.log4j.core.config.Configuration config,
                             Charset aCharset,
                             org.apache.logging.log4j.core.layout.AbstractStringLayout.Serializer headerSerializer,
                             org.apache.logging.log4j.core.layout.AbstractStringLayout.Serializer footerSerializer,
                             @Nullable
                             DateFormat dateFormat,
                             boolean threadPrinting,
                             boolean levelPrinting,
                             boolean loggerPrinting,
                             boolean contextPrinting,
                             String messageKey)
    • Method Detail

      • toSerializable

        public String toSerializable​(org.apache.logging.log4j.core.LogEvent event)