io.dropwizard.jackson.Discoverable
, io.dropwizard.logging.layout.DiscoverableLayoutFactory<E>
AccessJsonLayoutBaseFactory
, EventJsonLayoutBaseFactory
public abstract class AbstractJsonLayoutBaseFactory<E extends ch.qos.logback.core.spi.DeferredProcessingAware>
extends java.lang.Object
implements io.dropwizard.logging.layout.DiscoverableLayoutFactory<E>
Name | Default | Description |
---|---|---|
timestampFormat |
(none) | By default, the timestamp is not formatted; To format the timestamp using set the property with the
corresponding DateTimeFormatter string, for example, yyyy-MM-ddTHH:mm:ss.SSSZ |
prettyPrint |
false |
Whether the JSON output should be formatted for human readability. |
appendLineSeparator |
true |
Whether to append a line separator at the end of the message formatted as JSON. |
customFieldNames |
empty | A map of field name replacements. For example: (requestTime:request_time, userAgent:user_agent) |
additionalFields |
empty | A map of fields to add. |
Constructor | Description |
---|---|
AbstractJsonLayoutBaseFactory() |
Modifier and Type | Method | Description |
---|---|---|
protected JsonFormatter |
createDropwizardJsonFormatter() |
|
protected TimestampFormatter |
createTimestampFormatter(java.util.TimeZone timeZone) |
|
java.util.Map<java.lang.String,java.lang.Object> |
getAdditionalFields() |
|
java.util.Map<java.lang.String,java.lang.String> |
getCustomFieldNames() |
|
java.lang.String |
getTimestampFormat() |
|
boolean |
isAppendLineSeparator() |
|
boolean |
isPrettyPrint() |
|
void |
setAdditionalFields(java.util.Map<java.lang.String,java.lang.Object> additionalFields) |
|
void |
setAppendLineSeparator(boolean appendLineSeparator) |
|
void |
setCustomFieldNames(java.util.Map<java.lang.String,java.lang.String> customFieldNames) |
|
void |
setPrettyPrint(boolean prettyPrint) |
|
void |
setTimestampFormat(java.lang.String timestampFormat) |
@Nullable public java.lang.String getTimestampFormat()
public void setTimestampFormat(java.lang.String timestampFormat)
public boolean isPrettyPrint()
public void setPrettyPrint(boolean prettyPrint)
public boolean isAppendLineSeparator()
public void setAppendLineSeparator(boolean appendLineSeparator)
public java.util.Map<java.lang.String,java.lang.String> getCustomFieldNames()
public void setCustomFieldNames(java.util.Map<java.lang.String,java.lang.String> customFieldNames)
public java.util.Map<java.lang.String,java.lang.Object> getAdditionalFields()
public void setAdditionalFields(java.util.Map<java.lang.String,java.lang.Object> additionalFields)
protected JsonFormatter createDropwizardJsonFormatter()
protected TimestampFormatter createTimestampFormatter(java.util.TimeZone timeZone)
Copyright © 2018. All rights reserved.