addMetadata

protected final void addMetadata<T>(MetadataKey<T> key, T value)

Adds the given key/value pair to this logging context. If the key cannot be repeated, and there is already a value for the key in the metadata, then the existing value is replaced, otherwise the value is added at the end of the metadata.

Parameters

key

the metadata key (see LogData).

value

the metadata value.