public class ObjectFieldsAppendingMarker extends LogstashMarker
com.fasterxml.jackson.annotation.JsonUnwrapped
annotation works.
For example, if the object is:
{ name1 : "value1", name2 : 5, name3 : [1, 2, 3], name4 : { name5 : 6 } }
Then the name1, name2, name3, name4 fields will be added to the json for the logstash event.
For example:
{ name1 : "value1", name2 : 5, name3 : [1, 2, 3], name4 : { name5 : 6 } }Note that if the object cannot be unwrapped, then nothing will be written.
Modifier and Type | Field and Description |
---|---|
static String |
MARKER_NAME |
MARKER_NAME_PREFIX
Constructor and Description |
---|
ObjectFieldsAppendingMarker(Object object) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
void |
writeTo(com.fasterxml.jackson.core.JsonGenerator generator)
Writes the data associated with this marker to the given
JsonGenerator . |
and, with
public static final String MARKER_NAME
public ObjectFieldsAppendingMarker(Object object)
public void writeTo(com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
LogstashMarker
JsonGenerator
.writeTo
in class LogstashMarker
IOException
public boolean equals(Object obj)
equals
in interface org.slf4j.Marker
equals
in class org.slf4j.helpers.BasicMarker
public int hashCode()
hashCode
in interface org.slf4j.Marker
hashCode
in class org.slf4j.helpers.BasicMarker
Copyright © 2015. All Rights Reserved.