Skip to content
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

[MS11] Log4j API generalization #2 #2290

Closed
9 tasks done
ppkarwasz opened this issue Feb 15, 2024 · 1 comment
Closed
9 tasks done

[MS11] Log4j API generalization #2 #2290

ppkarwasz opened this issue Feb 15, 2024 · 1 comment
Assignees
Labels
STF-Milestones Milestones funded by the Sovereign Tech Fund
Milestone

Comments

@ppkarwasz
Copy link
Contributor

ppkarwasz commented Feb 15, 2024

Following the conclusion of #2273, we continue our task of removing version 3.x of log4j-api and replace it with version 2.x.

This task requires changes in both the 2.x and main branches.

Changes to Log4j API 2.x

Since log4j-api is not a pure API artifact and contains a lot of utility classes, we need to create extension points that will allow Log4j Core 3.x to replace the utility classes from log4j-api that require breaking changes.

All the functionality accessible from the org.apache.logging.log4j package (the public API) is provided by five services:

Of these five services, only LoggerContextFactory and ThreadContextMap need to be provided by a logging implementation.

While in Log4j Core 2.x these services can be created independently and access each other through the LogManager/ThreadContext static methods, in Log4j Core 3.x they are linked together by a common dependency injection context and need to be created by a common factory.

Therefore we need to:

Changes to Log4j Core 3.x

The lion's share of this task concentrates on Log4j Core 3.x, which must incorporate all the enhancements that are currently part of Log4j API 3.x. Currently the main differences between Log4j API 2.x and 3.x are:

We decided to move those parts of Log4j API 3.x into a new "utility class"-only Maven artifact log4j-kit, that can be shared between Log4j API implementations the same way log4j-api 2.x is, but will allow for breaking changes between major versions, without affecting the end users.

The plan for the new artifact is log4j-kit:

Since this task requires widespread changes in Log4j Core 3.x code, we can also perform these maintenance tasks:

@grobmeier
Copy link
Member

Checked, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STF-Milestones Milestones funded by the Sovereign Tech Fund
Projects
None yet
Development

No branches or pull requests

2 participants