-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Remove Supplier
#2175
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
Remove Supplier
#2175
Conversation
We discussed this many times and we can not do it, because of binary compatibility. Users of What we can do is to create a public interface Logger {
public void debug(java.util.function.Supplier<?>);
...
} and let the old interface extend it: public interface Logger extends org.apache.logging.log4j.v3.Logger {
public void debug(org.apache.logging.log4j.util.Supplier<?>);
...
} |
|
Yes, I am sure. This was discussed in at least two meetings. I don't know if you were present, but @rgoers and @garydgregory can probably confirm. We need to categorize the breaking changes into at least 3 categories:
The I would categorize the changes in #2171 as category 2: I strongly believe that not many users reference Regarding Remark: Of course I know that Since SLF4J also has these API leakage properties (e.g. |
I would classify the breakage a little differently. We can expect that applications will upgrade the log4j version but still have dependencies on libraries compiled against the log4j 2 api. Those applications MUST continue to work. I am less concerned about minor changes in core that are resolved by a simple recompile as MOST applications will be recompiling to pick up Log4j 3.x anyway. But as it stands this PR cannot be merged. |
Our API is bloated, I presume this is public knowledge. I don't think we should be extending it with yet another |
As I've mentioned before elsewhere I think we are taking the wrong path with version 3, we should be allowed to break BC in a major version. Then I'd expect to change the package name and maven coordinates to match. It's the only sane way to clean up our legacy public and protected APIs. |
Any parallel v3 API will still require the Core to support both v2 and v3 APIs. Otherwise, you'd end up with at least two logging backends at the same time, and that's unlikely to be the desired behavior of anyone. |
Removes deprecated
org.apache.logging.log4j.util.Supplier
in favor ofjava.util.function.Supplier
.