Class JsonLayout.Builder<B extends JsonLayout.Builder<B>>

java.lang.Object
org.apache.logging.log4j.core.layout.AbstractLayout.Builder<B>
org.apache.logging.log4j.core.layout.AbstractStringLayout.Builder<B>
org.apache.logging.log4j.core.layout.AbstractJacksonLayout.Builder<B>
org.apache.logging.log4j.core.layout.JsonLayout.Builder<B>
All Implemented Interfaces:
Builder<JsonLayout>
Enclosing class:
JsonLayout

public static class JsonLayout.Builder<B extends JsonLayout.Builder<B>> extends org.apache.logging.log4j.core.layout.AbstractJacksonLayout.Builder<B> implements Builder<JsonLayout>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public JsonLayout build()
      Description copied from interface: Builder
      Builds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.
      Specified by:
      build in interface Builder<B extends JsonLayout.Builder<B>>
      Returns:
      the configured instance.
    • isPropertiesAsList

      public boolean isPropertiesAsList()
    • setPropertiesAsList

      public B setPropertiesAsList(boolean propertiesAsList)
    • getObjectMessageAsJsonObject

      public boolean getObjectMessageAsJsonObject()
    • setObjectMessageAsJsonObject

      public B setObjectMessageAsJsonObject(boolean objectMessageAsJsonObject)
    • getAdditionalFields

      public KeyValuePair[] getAdditionalFields()
      Overrides:
      getAdditionalFields in class org.apache.logging.log4j.core.layout.AbstractJacksonLayout.Builder<B extends JsonLayout.Builder<B>>
    • setAdditionalFields

      public B setAdditionalFields(KeyValuePair[] additionalFields)
      Description copied from class: org.apache.logging.log4j.core.layout.AbstractJacksonLayout.Builder
      Additional fields to set on each log event.
      Overrides:
      setAdditionalFields in class org.apache.logging.log4j.core.layout.AbstractJacksonLayout.Builder<B extends JsonLayout.Builder<B>>
      Returns:
      this builder