public abstract class AbstractJsonLayoutBaseFactory<E extends ch.qos.logback.core.spi.DeferredProcessingAware> extends Object implements 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 and Description |
---|
AbstractJsonLayoutBaseFactory() |
Modifier and Type | Method and Description |
---|---|
protected JsonFormatter |
createDropwizardJsonFormatter() |
protected TimestampFormatter |
createTimestampFormatter(TimeZone timeZone) |
Map<String,Object> |
getAdditionalFields() |
Map<String,String> |
getCustomFieldNames() |
String |
getTimestampFormat() |
boolean |
isAppendLineSeparator() |
boolean |
isPrettyPrint() |
void |
setAdditionalFields(Map<String,Object> additionalFields) |
void |
setAppendLineSeparator(boolean appendLineSeparator) |
void |
setCustomFieldNames(Map<String,String> customFieldNames) |
void |
setPrettyPrint(boolean prettyPrint) |
void |
setTimestampFormat(String timestampFormat) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
build
public void setTimestampFormat(String timestampFormat)
public boolean isPrettyPrint()
public void setPrettyPrint(boolean prettyPrint)
public boolean isAppendLineSeparator()
public void setAppendLineSeparator(boolean appendLineSeparator)
protected JsonFormatter createDropwizardJsonFormatter()
protected TimestampFormatter createTimestampFormatter(TimeZone timeZone)
Copyright © 2011. All rights reserved.