Class AbstractJacksonLayout.Builder<B extends AbstractJacksonLayout.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>
- Direct Known Subclasses:
JsonLayout.Builder,XmlLayout.Builder,YamlLayout.Builder
- Enclosing class:
AbstractJacksonLayout
public abstract static class AbstractJacksonLayout.Builder<B extends AbstractJacksonLayout.Builder<B>>
extends AbstractStringLayout.Builder<B>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate KeyValuePair[]private booleanprivate booleanprivate Stringprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanbooleanbooleanIf "true", includes the stacktrace of any Throwable in the generated data, defaults to "true".booleanbooleanbooleanbooleansetAdditionalFields(KeyValuePair[] additionalFields) Additional fields to set on each log event.setCompact(boolean compact) setComplete(boolean complete) setEndOfLine(String endOfLine) setEventEol(boolean eventEol) setIncludeNullDelimiter(boolean includeNullDelimiter) Whether to include NULL byte as delimiter after each event (optional, default to false).setIncludeStacktrace(boolean includeStacktrace) If "true", includes the stacktrace of any Throwable in the generated JSON, defaults to "true".setIncludeTimeMillis(boolean includeTimeMillis) Whether to include the timestamp (in addition to the Instant) (optional, default to false).setLocationInfo(boolean locationInfo) setProperties(boolean properties) setStacktraceAsString(boolean stacktraceAsString) Whether to format the stacktrace as a string, and not a nested object (optional, defaults to false).protected StringtoStringOrNull(byte[] header) Methods inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayout.Builder
getCharset, getFooterSerializer, getHeaderSerializer, setCharset, setFooterSerializer, setHeaderSerializerMethods inherited from class org.apache.logging.log4j.core.layout.AbstractLayout.Builder
asBuilder, getConfiguration, getFooter, getHeader, setConfiguration, setFooter, setHeader
-
Field Details
-
eventEol
-
endOfLine
-
compact
-
complete
-
locationInfo
-
properties
-
includeStacktrace
-
stacktraceAsString
-
includeNullDelimiter
-
includeTimeMillis
-
additionalFields
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
toStringOrNull
-
getEventEol
public boolean getEventEol() -
getEndOfLine
-
isCompact
public boolean isCompact() -
isComplete
public boolean isComplete() -
isLocationInfo
public boolean isLocationInfo() -
isProperties
public boolean isProperties() -
isIncludeStacktrace
public boolean isIncludeStacktrace()If "true", includes the stacktrace of any Throwable in the generated data, defaults to "true".- Returns:
- If "true", includes the stacktrace of any Throwable in the generated data, defaults to "true".
-
isStacktraceAsString
public boolean isStacktraceAsString() -
isIncludeNullDelimiter
public boolean isIncludeNullDelimiter() -
isIncludeTimeMillis
public boolean isIncludeTimeMillis() -
getAdditionalFields
-
setEventEol
-
setEndOfLine
-
setCompact
-
setComplete
-
setLocationInfo
-
setProperties
-
setIncludeStacktrace
If "true", includes the stacktrace of any Throwable in the generated JSON, defaults to "true".- Parameters:
includeStacktrace- If "true", includes the stacktrace of any Throwable in the generated JSON, defaults to "true".- Returns:
- this builder
-
setStacktraceAsString
Whether to format the stacktrace as a string, and not a nested object (optional, defaults to false).- Returns:
- this builder
-
setIncludeNullDelimiter
Whether to include NULL byte as delimiter after each event (optional, default to false).- Returns:
- this builder
-
setIncludeTimeMillis
Whether to include the timestamp (in addition to the Instant) (optional, default to false).- Returns:
- this builder
-
setAdditionalFields
Additional fields to set on each log event.- Returns:
- this builder
-