vy opened a new pull request, #2104:
URL: https://github.com/apache/logging-log4j2/pull/2104

   This PR addresses #2075 by means of following changes:
   - Recycler factories in the API are converted to `ServiceProvider`s
   - JCTools dependencies in `log4j-api` and `log4j-core` are removed in favor 
of a new module: `log4j-jctools`
   
   ### Why does `log4j-jctools` depend on `log4j-core`?
   
   There are two places where JCTools is used as an optional dependency:
   1. In `log4j-api` as a `Recycler[Factory]` (used almost everywhere) 
implementation
   2. In `log4j-core` as a `BlockingQueueFactory` (used by `AsyncAppender` in 
`log4j-core`) implementation
   
   There are two approaches I can think of to remove the JCTools optional 
dependencies:
   1. Hoist `BlockingQueueFactory` from `log4j-core` to `log4j-api`
      - :smiley: `log4j-jctools` will only need to depend on `log4j-api`
      - :frowning_face: `log4j-api` will be introduced a component that only 
matters for some `log4j-core` internal
      - :frowning_face: `log4j-core` has access to plugins and hence, users 
were expected to provide custom `@Configurable @Plugin BlockingQueueFactory` 
implementations that they can refer to in `log4j2.xml`. Though moving 
`BlockingQueueFactory` to `log4j-api` will break this contract completely, 
since `log4j-api` has no notion of plugins.
   2. Make `log4j-jctools` depend on `log4j-core` and provide both 
`Recycler[Factory]` and `BlockingQueueFactory` implementations
      - :frowning_face: Users who wants a JCTools-based recycler, but no 
`log4j-core` et al. (if there is such a use case at all) needs to manually 
exclude `log4j-core`
   
   ### Review kit
   
   1. You can safely ignore files changed due to package relocations.
   1. Start with changes in `o.a.l.log4j.internal.recycler` and 
`o.a.l.log4j.spi` packages of `log4j-api` module
   1. Proceed to `log4j-core`
   1. Now it is safe to check `log4j-jctools`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to