[slf4j-dev] [JIRA] (SLF4J-423) 1.8.0-beta0 bug in log4j MDC handling

QOS.CH (JIRA) noreply-jira at qos.ch
Wed Dec 6 17:06:00 CET 2017


     [ https://jira.qos.ch/browse/SLF4J-423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ceki Gülcü resolved SLF4J-423.
------------------------------
    Resolution: Won't Fix

See Ralph Goer's answer.

> 1.8.0-beta0 bug in log4j MDC handling
> -------------------------------------
>
>                 Key: SLF4J-423
>                 URL: https://jira.qos.ch/browse/SLF4J-423
>             Project: SLF4J
>          Issue Type: Bug
>          Components: Unspecified
>    Affects Versions: 1.8.0-beta0
>         Environment: Java 9
>            Reporter: Brett Wooldridge
>            Assignee: SLF4J developers list
>
> When running with log4j 2.10.0, and using the slf4j-log4j12-1.8.0-beta0 release, the follow error is received:
> {code:java}
> java.lang.NoSuchFieldException: mdc
>  at java.base/java.lang.Class.getDeclaredField(Unknown Source)
>  at org.apache.log4j.MDCFriend.fixForJava9(MDCFriend.java:13)
>  at org.slf4j.log4j12.Log4jMDCAdapter.<clinit>(Log4jMDCAdapter.java:38)
>  at org.slf4j.log4j12.Log4j12ServiceProvider.initialize(Log4j12ServiceProvider.java:37)
>  at org.slf4j.LoggerFactory.bind(LoggerFactory.java:153)
>  at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:141)
>  at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:413)
>  at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:405)
>  at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:354)
>  at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:380){code}
> The MDC class in log4j-1.2-api-2.10.0.jar no longer contains a field named "mdc".  (This is on Java 9).
>  



--
This message was sent by Atlassian JIRA
(v7.3.1#73012)


More information about the slf4j-dev mailing list