public class EmptyLogstashMarker extends LogstashMarker
LogstashMarker.and(Marker)
.
For example:
LogstashMarker marker = Markers.empty(); if (condition1) { marker = marker.and(Markers.append("fieldName1", value1); } if (condition2) { marker = marker.and(Markers.append("fieldName2", value2); }
Modifier and Type | Field and Description |
---|---|
static String |
EMPTY_MARKER_NAME |
MARKER_NAME_PREFIX
Constructor and Description |
---|
EmptyLogstashMarker() |
Modifier and Type | Method and Description |
---|---|
void |
writeTo(com.fasterxml.jackson.core.JsonGenerator generator)
Writes the data associated with this marker to the given
JsonGenerator . |
and, with
add, contains, contains, equals, getName, hasChildren, hashCode, hasReferences, iterator, remove, toString
public static final String EMPTY_MARKER_NAME
public void writeTo(com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
LogstashMarker
JsonGenerator
.writeTo
in class LogstashMarker
generator
- the generator to which to write the output of this marker.IOException
- if there was an error writing to the generatorCopyright © 2019. All rights reserved.