Interface MdcEntryWriter

All Known Implementing Classes:
BooleanMdcEntryWriter, DoubleMdcEntryWriter, LongMdcEntryWriter

public interface MdcEntryWriter
Writes an entry from the MDC to the JsonGenerator. Implementations can convert the value as appropriate, or chose to not write anything for the entry.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    writeMdcEntry(JsonGenerator generator, String fieldName, String mdcKey, String mdcValue)
    Writes the given MDC entry allowing to manipulate the output of the field name and field value.
  • Method Details

    • writeMdcEntry

      boolean writeMdcEntry(JsonGenerator generator, String fieldName, String mdcKey, String mdcValue) throws IOException
      Writes the given MDC entry allowing to manipulate the output of the field name and field value.
      Parameters:
      generator - the generator to write the entry to.
      fieldName - the field name to use when writing the entry.
      mdcKey - the key of the MDC map entry.
      mdcValue - the value of the MDC map entry.
      Returns:
      true if this MdcEntryWriter handled the output of the entry, otherwise return false.
      Throws:
      IOException