public class AccessMessageJsonProvider extends AccessEventFormattedTimestampJsonProvider
AbstractFormattedTimestampJsonProvider.NumberTimestampWriter, AbstractFormattedTimestampJsonProvider.StringFormatterWriter, AbstractFormattedTimestampJsonProvider.TimestampWriter
Modifier and Type | Field and Description |
---|---|
static String |
FIELD_MESSAGE |
DEFAULT_TIMEZONE_KEYWORD, FIELD_TIMESTAMP, UNIX_TIMESTAMP_AS_NUMBER, UNIX_TIMESTAMP_AS_STRING
context
Constructor and Description |
---|
AccessMessageJsonProvider() |
Modifier and Type | Method and Description |
---|---|
void |
setFieldNames(LogstashAccessFieldNames fieldNames) |
void |
writeTo(JsonGenerator generator,
IAccessEvent event)
Writes information about the event, to the given generator.
|
getTimestampAsMillis
getFormattedTimestamp, getPattern, getTimeZone, setPattern, setTimeZone
getFieldName, setFieldName
isStarted, prepareForDeferredProcessing, start, stop
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
public static final String FIELD_MESSAGE
public void writeTo(JsonGenerator generator, IAccessEvent event) throws IOException
JsonProvider
When called, the generator is assumed to be within a JSON object context (i.e. this provider should write fields and their values to the generator). Upon return, the generator should be within the same JSON object context.
writeTo
in interface JsonProvider<IAccessEvent>
writeTo
in class AbstractFormattedTimestampJsonProvider<IAccessEvent,LogstashAccessFieldNames>
generator
- the JsonGenerator
to produce JSON contentevent
- the event to convert into JSONIOException
- if an I/O error occurspublic void setFieldNames(LogstashAccessFieldNames fieldNames)
setFieldNames
in interface FieldNamesAware<LogstashAccessFieldNames>
setFieldNames
in class AbstractFormattedTimestampJsonProvider<IAccessEvent,LogstashAccessFieldNames>
Copyright © 2013–2022. All rights reserved.