Event - type of event (ILoggingEvent or IAccessEvent).public class LogstashVersionJsonProvider<Event extends ch.qos.logback.core.spi.DeferredProcessingAware> extends AbstractFieldJsonProvider<Event> implements FieldNamesAware<LogstashCommonFieldNames>
isWriteAsString()).
This is intended to be the logstash JSON format version.
By default, the version is 1.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_VERSION |
static String |
FIELD_VERSION |
| Constructor and Description |
|---|
LogstashVersionJsonProvider() |
| Modifier and Type | Method and Description |
|---|---|
int |
getVersion() |
boolean |
isWriteAsString() |
void |
setFieldNames(LogstashCommonFieldNames fieldNames) |
void |
setVersion(int version) |
void |
setWriteAsString(boolean writeAsString) |
void |
writeTo(com.fasterxml.jackson.core.JsonGenerator generator,
Event event)
Writes information about the event,
to the given generator.
|
getFieldName, setFieldNameisStarted, prepareForDeferredProcessing, start, stopaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextpublic static final String FIELD_VERSION
public static final int DEFAULT_VERSION
public void writeTo(com.fasterxml.jackson.core.JsonGenerator generator,
Event event)
throws IOException
JsonProviderwriteTo in interface JsonProvider<Event extends ch.qos.logback.core.spi.DeferredProcessingAware>IOExceptionpublic void setFieldNames(LogstashCommonFieldNames fieldNames)
setFieldNames in interface FieldNamesAware<LogstashCommonFieldNames>public int getVersion()
public void setVersion(int version)
public boolean isWriteAsString()
public void setWriteAsString(boolean writeAsString)
Copyright © 2016. All Rights Reserved.