Class ELJsonLayout

  • All Implemented Interfaces:
    Serializable, org.apache.logging.log4j.core.Layout<String>, org.apache.logging.log4j.core.StringLayout

    @Plugin(name="ELJsonLayout",
            category="Core",
            elementType="layout",
            printObject=true)
    public class ELJsonLayout
    extends org.apache.logging.log4j.core.layout.AbstractStringLayout
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int RAWJSON_MARK_LEN  
      static String RAWJSON_MARKER  
      • Fields inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayout

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

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

        ELEMENT_TYPE
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ELJsonLayout​(Charset charset)  
    • Method Summary

      Modifier and Type Method Description
      static ELJsonLayout createLayout​(Charset charset, boolean prettyPrint)  
      String toSerializable​(org.apache.logging.log4j.core.LogEvent event)  
      • Methods inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayout

        getBytes, getCharset, getContentType, getStringBuilder, toByteArray
      • Methods inherited from class org.apache.logging.log4j.core.layout.AbstractLayout

        getContentFormat, getFooter, getHeader
      • Methods inherited from interface org.apache.logging.log4j.core.Layout

        getContentFormat, getFooter, getHeader
    • Field Detail

      • RAWJSON_MARK_LEN

        public static final int RAWJSON_MARK_LEN
    • Constructor Detail

      • ELJsonLayout

        protected ELJsonLayout​(Charset charset)
    • Method Detail

      • createLayout

        @PluginFactory
        public static ELJsonLayout createLayout​(@PluginAttribute(value="charset",defaultString="UTF-8")
                                                Charset charset,
                                                @PluginAttribute(value="prettyPrint",defaultString="false")
                                                boolean prettyPrint)
      • toSerializable

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