Class BooleanMdcEntryWriter
java.lang.Object
net.logstash.logback.composite.loggingevent.mdc.BooleanMdcEntryWriter
- All Implemented Interfaces:
MdcEntryWriter
Writes boolean values (instead of String values) for any MDC values that equal "true" or "false", ignoring case.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
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.
-
Constructor Details
-
BooleanMdcEntryWriter
public BooleanMdcEntryWriter()
-
-
Method Details
-
writeMdcEntry
public boolean writeMdcEntry(JsonGenerator generator, String fieldName, String mdcKey, String mdcValue) throws IOException Description copied from interface:MdcEntryWriter
Writes the given MDC entry allowing to manipulate the output of the field name and field value.- Specified by:
writeMdcEntry
in interfaceMdcEntryWriter
- 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
-