# Does versions of logstash\>7.3.0 support addKeyValue() in the slf4j fluent API?

**URL:** <https://discuss.elastic.co/t/does-versions-of-logstash-7-3-0-support-addkeyvalue-in-the-slf4j-fluent-api/336058>\
**Category:** Logstash\
**Created:** [June 15, 2023, 8:23am UTC](https://discuss.elastic.co/t/does-versions-of-logstash-7-3-0-support-addkeyvalue-in-the-slf4j-fluent-api/336058 "2023-06-15T08:23:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steinar\_Bang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steinar_bang/32/122285_2.png) [@Steinar\_Bang](https://discuss.elastic.co/u/Steinar_Bang)\
**Post date:** [June 15, 2023, 8:23am UTC](https://discuss.elastic.co/t/does-versions-of-logstash-7-3-0-support-addkeyvalue-in-the-slf4j-fluent-api/336058/1 "2023-06-15T08:23:38Z")

</div>

I just discovered [slf4j's fluent API](https://www.slf4j.org/manual.html#fluent) yesterday, and tried to use it.

Unfortunately the key/value pairs I added with [addKeyValue()](https://www.slf4j.org/apidocs/org/slf4j/spi/LoggingEventBuilder.html#addKeyValue-java.lang.String-java.lang.Object-) in slf4j 2.0.7/logstash 7.3.0 were lost from the output.

I had hoped for at least the default slf4j behaviour, which is putting them into "{} " entries at the start of the formatted messages.

Does newer versions than logstash 7.3.0 support addKeyValue() from the slf4j fluent API?

Thanks!

- Steinar

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 13, 2023, 8:24am UTC](https://discuss.elastic.co/t/does-versions-of-logstash-7-3-0-support-addkeyvalue-in-the-slf4j-fluent-api/336058/2 "2023-07-13T08:24:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
