[slf4j-dev] [JIRA] Updates for SLF4J-168: Feature-Request: allow Object as value in MDC.put

QOS.CH (JIRA) noreply-jira at qos.ch
Fri Apr 1 09:37:00 CEST 2022


SLF4J / SLF4J-168 [Open]
Feature-Request: allow Object as value in MDC.put

==============================

Here's what changed in this issue in the last few minutes.

There is 1 comment.

View or comment on issue using this link
https://jira.qos.ch/browse/SLF4J-168

==============================
 1 comment
------------------------------

Joseph Walton on 01/Apr/22 9:25 AM
I've run into the same mismatch. However, Log4j 2's [ThreadContext|https://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/ThreadContext.html] moves to a [{{String}} for the value to be put|https://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/ThreadContext.html#put-java.lang.String-java.lang.String-]. Is there a notable backing implementation that keeps this as {{Object}}?, or would this be better handled through {{LoggingEventBuilder}}'s [addKeyValue|https://www.slf4j.org/api/org/slf4j/spi/LoggingEventBuilder.html#addKeyValue-java.lang.String-java.util.function.Supplier-]?

 


==============================
 This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)



More information about the slf4j-dev mailing list