Event
- type of event (ILoggingEvent
or IAccessEvent
).public class ContextJsonProvider<Event extends DeferredProcessingAware> extends AbstractFieldJsonProvider<Event> implements FieldNamesAware<LogstashCommonFieldNames>
Context
into the JSON event.
If the fieldName is set, then the properties will be written
to that field as a subobject.
Otherwise, the properties are written inline.context
Constructor and Description |
---|
ContextJsonProvider() |
Modifier and Type | Method and Description |
---|---|
void |
setFieldNames(LogstashCommonFieldNames fieldNames) |
void |
writeTo(JsonGenerator generator,
Event event)
Writes information about the event,
to the given generator.
|
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 void writeTo(JsonGenerator generator, Event event) throws IOException
JsonProvider
writeTo
in interface JsonProvider<Event extends DeferredProcessingAware>
IOException
public void setFieldNames(LogstashCommonFieldNames fieldNames)
setFieldNames
in interface FieldNamesAware<LogstashCommonFieldNames>
Copyright © 2020. All rights reserved.