-
Hi, I'm trying to only use SLF4J interface methods in my code, yet still be able to produce JSON output with custom key/value fields. Using the logstash logback library-specific logger.atInfo().log("kvmessage", StructuredArguments.keyValue("somekey", "somevalue")) But using the sl4fj method doesn't appear to work with the logback-logstash encoder. (no logger.atInfo().addKeyValue("somekey", "somevalue").log("kvmessage") Is there a technique I can use in the code that does work? FWIW I've also considered Markers, but the problem there is that SLF4J doesn't provide a usable Marker Map implementation out of the box. Thanks for any ideas. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @dtanner, Support for slf4j 2's fluent api key value pairs was added in logstash-logback-encoder 7.4 |
Beta Was this translation helpful? Give feedback.
Hey @dtanner,
Support for slf4j 2's fluent api key value pairs was added in logstash-logback-encoder 7.4