public abstract class FormattedTimestampJsonProvider<Event extends ch.qos.logback.core.spi.DeferredProcessingAware,FieldNames extends LogstashCommonFieldNames> extends AbstractFieldJsonProvider<Event> implements FieldNamesAware<FieldNames>
Modifier and Type | Field and Description |
---|---|
static String |
FIELD_TIMESTAMP |
Constructor and Description |
---|
FormattedTimestampJsonProvider() |
Modifier and Type | Method and Description |
---|---|
protected String |
getFormattedTimestamp(Event event) |
String |
getPattern() |
protected abstract long |
getTimestampAsMillis(Event event) |
String |
getTimeZone() |
void |
setFieldNames(FieldNames fieldNames) |
void |
setPattern(String pattern) |
void |
setTimeZone(String timeZoneId) |
void |
start() |
void |
writeTo(com.fasterxml.jackson.core.JsonGenerator generator,
Event event)
Writes information about the event,
to the given generator.
|
getFieldName, setFieldName
isStarted, prepareForDeferredProcessing, stop
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
public static final String FIELD_TIMESTAMP
public void setFieldNames(FieldNames fieldNames)
setFieldNames
in interface FieldNamesAware<FieldNames extends LogstashCommonFieldNames>
public void writeTo(com.fasterxml.jackson.core.JsonGenerator generator, Event event) throws IOException
JsonProvider
writeTo
in interface JsonProvider<Event extends ch.qos.logback.core.spi.DeferredProcessingAware>
IOException
protected abstract long getTimestampAsMillis(Event event)
public void start()
start
in interface ch.qos.logback.core.spi.LifeCycle
start
in class AbstractJsonProvider<Event extends ch.qos.logback.core.spi.DeferredProcessingAware>
public String getPattern()
public void setPattern(String pattern)
public String getTimeZone()
public void setTimeZone(String timeZoneId)
Copyright © 2016. All Rights Reserved.