-
Notifications
You must be signed in to change notification settings - Fork 38.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace spring-jcl with regular Apache Commons Logging 1.3 #32459
Comments
We can consider officially replacing As for JPMS errors, this is arguably no worse than when using the FWIW, Commons Logging 1.3.0 should work fine with Spring Framework 5.x/6.x already when excluding |
Yes, with Commons Logging 1.3.0 provides SLF4J and Log4j API support out-of-the-box, using the same algorithm as
Note: Remark: Since Spring 7.x can introduce breaking changes, maybe Spring could migrate to Log4j API? The openrewrite/rewrite-logging-frameworks allows to do it already now. |
Feels biased, some of us are biased the other way in using slf4j api. Now if one of those would simply win, it would be great. That didn't happen with log4j 2. Maybe 3 changes that. But then again slf4j has been extremely active now which is very unlike last few years. Everything else sounds great and saw your request on slf4j as well. Less is better, we have far too many. It just needs to be clear from all parties but personally I too would like spring to choose one. IMO commons logging was entirely dead, its back and appears to mostly be trying to solve this issues more than anything else so I do applaud that work. Too many forks otherwise. But I think they could just use that and its really just spring-jcl redux so folks don't get pushed to one of the two that matter. |
It is biased, but as you remark comparisons between SLF4J and Log4j API often are. These comparison often base on a false sense of continuity between Log4j 1.x and Log4j 2.x or a false sense of independence between SLF4J and its Logback implementation. In reality Spring and most users just need parameterized logging and some lambda support. Maybe a third option will arise (Commons Logging 2.x?) that will only concentrate on releasing an interface instead of promoting its own implementation. There will be no Log4j API 3.x for now, since Log4j Core 3.x will provide no breaking changes in the API (similarly as SLF4J 2.x didn't have any breaking changes from SLF4J 1.x). |
For better or for worse, we have a lot of binary dependencies on the Commons Logging API across the portfolio, partly due to exposed We generally prefer to retain binary compatibility across major releases so that existing extensions and higher-level frameworks keep working when the core framework is being updated. This is particularly important for the Spring Framework 6->7 transition which is meant to be much easier to go through than 5->6 was with the Commons Logging 1.3 sounds great for those purposes. If spring-jcl can be fully replaced there, I'll be happy to phase it out. |
😊 thank you @jhoeller |
As of Apache Commons Logging 1.3.0, the module
spring-jcl
is redundant.The module
spring-jcl
uses the Apache Commons Logging namespace and causes JPMS errors when used with the real Apache Commons Logging.The text was updated successfully, but these errors were encountered: