SAP / cf-java-logging-support

The Java Logging Support for Cloud Foundry supports the creation of structured log messages and the collection of request metrics
Apache License 2.0
77 stars 48 forks source link

Log4j-slf4j-ipml artifact got moved to log4j-slf4j2-impl #163

Open Icetea1991 opened 1 year ago

Icetea1991 commented 1 year ago

Hello colleagues,

in the newest version 3.7.1 of cf-java-logging-support-log4j2 you still refer to the

    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-slf4j-impl</artifactId>
        <version>${log4j2.version}</version>
        <scope>provided</scope>
    </dependency>

However, if you go here: https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j-impl

there is a warning that the artifact got moved to: https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j2-impl

org.apache.logging.log4j log4j-slf4j2-impl 2.20.0 test

Kind regards Hendrik

KarstenSchnitter commented 1 year ago

Hi Hendrik,

Thanks for opening the issue. This library currently has issues with SLF4J 2.x, that needs to be fixed before upgrading. It is currently using SLF4J 1.7.36. I am not sure about the upgrade, seeing the conflicts with the current implementation. Do you have an idea on the impact for application developers when this change will be merged to the library?

Best Regards, Karsten

Icetea1991 commented 1 year ago

Hi, yes you are right about that. As a workaround I had to set the

org.slf4j slf4j-api 2.0.9

because otherwise it does not work. The StaticLoggerBinder class is not available in the version before 2.x.x.

So yeah, either you wait until they fix it in the new version or you go via the manual workaround.

KarstenSchnitter commented 1 year ago

I will do some tests on the compatibility between the two versions of SLF4J and then comment on how to proceed with this issue.