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:
{@code
{| 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, withpublic static final String MARKER_NAME
public ObjectFieldsAppendingMarker(Object object)
public void writeTo(com.fasterxml.jackson.core.JsonGenerator generator)
throws IOException
LogstashMarkerJsonGenerator.writeTo in class LogstashMarkerIOExceptionpublic boolean equals(Object obj)
equals in interface org.slf4j.Markerequals in class org.slf4j.helpers.BasicMarkerpublic int hashCode()
hashCode in interface org.slf4j.MarkerhashCode in class org.slf4j.helpers.BasicMarkerCopyright © 2014. All Rights Reserved.