public static class JsonEventFormatter.Builder extends Object
JsonEventFormatter.| Modifier and Type | Method and Description |
|---|---|
JsonEventFormatter.Builder |
addMetaData(Map<String,Object> metaData)
Adds meta-data to the final output.
|
JsonEventFormatter.Builder |
addMetaData(String key,
Object value)
Adds meta-data to the final output.
|
JsonEventFormatter |
build()
Creates the
JsonEventFormatter. |
JsonEventFormatter.Builder |
setIncludeTimestamp(boolean includeTimestamp)
Sets whether or not the timestamp should be added to the output.
|
JsonEventFormatter.Builder |
setTimestampFormatter(DateTimeFormatter formatter)
Set the formatter used to format the timestamp on the event.
|
JsonEventFormatter.Builder |
setTimestampKey(String timestampKey)
Sets the key for the timestamp for the event.
|
JsonEventFormatter.Builder |
setZoneId(ZoneId zoneId)
Set the zone id for the timestamp.
|
public JsonEventFormatter.Builder addMetaData(String key, Object value)
key - the key to addvalue - the value for the keypublic JsonEventFormatter.Builder addMetaData(Map<String,Object> metaData)
metaData - the meta-data to addpublic JsonEventFormatter.Builder setTimestampKey(String timestampKey)
timestamp.timestampKey - the key name or null to revert to the defaultpublic JsonEventFormatter.Builder setTimestampFormatter(DateTimeFormatter formatter)
formatter - the formatter to use or null to revert to the default.public JsonEventFormatter.Builder setZoneId(ZoneId zoneId)
ZoneId.systemDefault().zoneId - the zone id to use or null to revert to the defaultpublic JsonEventFormatter.Builder setIncludeTimestamp(boolean includeTimestamp)
true. If set to
false the zone id and
format are ignored.includeTimestamp - true to include the timestamp or false to leave the timestamp offpublic JsonEventFormatter build()
JsonEventFormatter.Copyright © 2020 JBoss by Red Hat. All rights reserved.