No. Our experience has shown that putting non-String values in ThreadLocals has to be done very carefully, so to make sure there aren’t any problems the ThreadContextMap only allows Strings.
Ralph > On Nov 2, 2019, at 1:11 PM, Volkan Yazıcı <[email protected]> wrote: > > Hello, > > LogEvent#getContextData() returns a ReadOnlyStringMap such that the > provided get() and forEach() allow non-String values in the entries. That > said, ReadOnlyStringMap#toMap() returns a Map<String, String>. Further, > both ThreadContext.put() and ThreadContext.putAll() only allow String > values. I am confused by this inconsistency. Is there a way to provide an > MDC entry where the value is of a non-String type? > > Best. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
