Hello,
Following up on this, I've submitted a PR to the 2.0 branch with the change to allow the logging of numeric values when using MDC. Is that the correct branch? Is this something that would be considered for SLF4J 2.0?
Thank you,
Anastas
----- Original message -----
From: Anastas Stoyanovsky/Pittsburgh/IBM
To: slf4j-dev@qos.ch
Cc:
Subject: SLF4J-168 Numeric Values in MDC for SLF4J 2.0
Date: Thu, Apr 2, 2020 4:17 PM
Hello,I'm new to this list so I hope I'm not breaking any protocols.I searched through the mailing list about the topic of MDC supporting only string values, and came across SLF4J-168: https://jira.qos.ch/projects/SLF4J/issues/SLF4J-168To have the ability to log numeric (and generally non-string) values, as is possible with Logback, would be of great use. I do cloud development; the ability to aggregate on numeric values in JSON logs in tools like Kibana is essential to our work. This precludes us from using SLF4J, since MDCs can only have string values. Being able to use SLF4j would allow the usage of shared libraries across different services written by different teams that use different logging providers without having to rewrite large amounts of legacy code.I see that there is a v2.0.0.-alpha1 release on Oct 1, 2019. Is 2.x under active development? Would it be possible to consider generalizing MDCs to internally use a Map<String, Object> instead of a Map<String, String>?As that would be a breaking change, this seems like a rare opportunity to do this. This is something we would happily contribute.Thank you,Anastas StoyanovskySoftware ArchitectIBM Watson
_______________________________________________ slf4j-dev mailing list slf4j-dev@qos.ch http://mailman.qos.ch/mailman/listinfo/slf4j-dev