public class MapEntriesAppendingMarker extends LogstashMarker
String via Object.toString(), and used as the field names.
The values are converted using an ObjectMapper.
For example, if the map contains is
name1= a String "value1",
name2= an Integer 5,
name3= an array containing [1, 2, 3],
name4= a map containing 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 |
|---|
MapEntriesAppendingMarker(Map<?,?> map) |
| 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 MapEntriesAppendingMarker(Map<?,?> map)
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.