public abstract class JsonLayoutBase<E>
extends ch.qos.logback.core.LayoutBase<E>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
appendLineSeparator |
static String |
CONTENT_TYPE |
protected boolean |
includeTimestamp |
protected JsonFormatter |
jsonFormatter |
protected String |
timestampFormat |
protected String |
timestampFormatTimezoneId |
| Constructor and Description |
|---|
JsonLayoutBase() |
| Modifier and Type | Method and Description |
|---|---|
protected DateFormat |
createDateFormat(String timestampFormat) |
String |
doLayout(E event) |
protected String |
format(Date date,
DateFormat format) |
protected String |
formatTimestamp(long timestamp) |
String |
getContentType() |
JsonFormatter |
getJsonFormatter() |
String |
getTimestampFormat() |
String |
getTimestampFormatTimezoneId() |
boolean |
isAppendLineSeparator() |
boolean |
isIncludeTimestamp() |
void |
setAppendLineSeparator(boolean appendLineSeparator) |
void |
setIncludeTimestamp(boolean includeTimestamp) |
void |
setJsonFormatter(JsonFormatter jsonFormatter) |
void |
setTimestampFormat(String timestampFormat) |
void |
setTimestampFormatTimezoneId(String timestampFormatTimezoneId) |
protected abstract Map |
toJsonMap(E e) |
getContext, getFileFooter, getFileHeader, getPresentationFooter, getPresentationHeader, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeader, start, stopaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getDeclaredOrigin, getStatusManagerpublic static final String CONTENT_TYPE
protected boolean includeTimestamp
protected String timestampFormat
protected String timestampFormatTimezoneId
protected boolean appendLineSeparator
protected JsonFormatter jsonFormatter
protected String formatTimestamp(long timestamp)
protected DateFormat createDateFormat(String timestampFormat)
protected String format(Date date, DateFormat format)
public String getContentType()
public boolean isIncludeTimestamp()
public void setIncludeTimestamp(boolean includeTimestamp)
public JsonFormatter getJsonFormatter()
public void setJsonFormatter(JsonFormatter jsonFormatter)
public String getTimestampFormat()
public void setTimestampFormat(String timestampFormat)
public String getTimestampFormatTimezoneId()
public void setTimestampFormatTimezoneId(String timestampFormatTimezoneId)
public boolean isAppendLineSeparator()
public void setAppendLineSeparator(boolean appendLineSeparator)
Copyright © 2012–2016. All rights reserved.