Package io.dropwizard.logging.json
Class AbstractJsonLayoutBaseFactory<E extends ch.qos.logback.core.spi.DeferredProcessingAware>
- java.lang.Object
-
- io.dropwizard.logging.json.AbstractJsonLayoutBaseFactory<E>
-
- All Implemented Interfaces:
Discoverable,DiscoverableLayoutFactory<E>
- Direct Known Subclasses:
AccessJsonLayoutBaseFactory,EventJsonLayoutBaseFactory
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 DateTimeFormatterstring, for example,yyyy-MM-ddTHH:mm:ss.SSSZprettyPrintfalseWhether the JSON output should be formatted for human readability. appendLineSeparatortrueWhether to append a line separator at the end of the message formatted as JSON. customFieldNamesempty A map of field name replacements. For example: (requestTime:request_time, userAgent:user_agent) additionalFieldsempty A map of fields to add.
-
-
Constructor Summary
Constructors Constructor Description AbstractJsonLayoutBaseFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JsonFormattercreateDropwizardJsonFormatter()protected TimestampFormattercreateTimestampFormatter(TimeZone timeZone)Map<String,Object>getAdditionalFields()Map<String,String>getCustomFieldNames()@Nullable StringgetTimestampFormat()booleanisAppendLineSeparator()booleanisPrettyPrint()voidsetAdditionalFields(Map<String,Object> additionalFields)voidsetAppendLineSeparator(boolean appendLineSeparator)voidsetCustomFieldNames(Map<String,String> customFieldNames)voidsetPrettyPrint(boolean prettyPrint)voidsetTimestampFormat(String timestampFormat)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.dropwizard.logging.common.layout.DiscoverableLayoutFactory
build
-
-
-
-
Method Detail
-
getTimestampFormat
public @Nullable String getTimestampFormat()
-
setTimestampFormat
public void setTimestampFormat(String timestampFormat)
-
isPrettyPrint
public boolean isPrettyPrint()
-
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint)
-
isAppendLineSeparator
public boolean isAppendLineSeparator()
-
setAppendLineSeparator
public void setAppendLineSeparator(boolean appendLineSeparator)
-
createDropwizardJsonFormatter
protected JsonFormatter createDropwizardJsonFormatter()
-
createTimestampFormatter
protected TimestampFormatter createTimestampFormatter(TimeZone timeZone)
-
-