public class RawJsonAppendingMarker extends SingleFieldAppendingMarker
Marker
OR StructuredArgument
that
writes a raw json value to the logstash json event
under a given field name.
When writing to the JSON data (via ArgumentsJsonProvider
or LogstashMarkersJsonProvider
),
the raw string is written verbatim without any modifications,
but assuming it must constitute a single legal JSON value (number, string, boolean, null, Array or List)
When writing to a String (when used as a StructuredArgument
to the event's formatted message),
the raw string is written as the field value.
Note that using RawJsonAppendingMarker
as a StructuredArgument
is not very common.
Modifier and Type | Field and Description |
---|---|
static String |
MARKER_NAME |
MARKER_NAME_PREFIX
Constructor and Description |
---|
RawJsonAppendingMarker(String fieldName,
String rawJson) |
RawJsonAppendingMarker(String fieldName,
String rawJson,
String messageFormatPattern) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Object |
getFieldValue()
Return the value that should be included in the output of
LogstashMarker.toString() . |
int |
hashCode() |
protected void |
writeFieldValue(com.fasterxml.jackson.core.JsonGenerator generator)
Writes the field value to the generator.
|
getFieldName, toStringSelf, writeFieldName, writeTo
and, toString, with
add, contains, contains, getName, hasChildren, hasReferences, iterator, remove
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
toString
forEach, iterator, spliterator
public static final String MARKER_NAME
protected void writeFieldValue(com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
SingleFieldAppendingMarker
writeFieldValue
in class SingleFieldAppendingMarker
IOException
public Object getFieldValue()
SingleFieldAppendingMarker
LogstashMarker.toString()
.getFieldValue
in class SingleFieldAppendingMarker
public boolean equals(Object obj)
equals
in interface org.slf4j.Marker
equals
in class SingleFieldAppendingMarker
public int hashCode()
hashCode
in interface org.slf4j.Marker
hashCode
in class SingleFieldAppendingMarker
Copyright © 2019. All rights reserved.