You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Ralph Goers <ra...@dslextreme.com> on 2022/01/08 07:17:24 UTC

Properties Enhancement in Log4j 2 3.x

Please review and provide feedback on https://cwiki.apache.org/confluence/display/LOGGING/Properties+Enhancement.

Note that some of the major goals of 3.0 are:

* Fully support the Java Platform Module System by having all relevant jars contain a module-info.java class.
* In support of JPMS, have log4j-core have as few dependencies as possible, including only requiring java.base.
* The Log4jPlugins.dat file used in 2.x will not work well in a JPMS environment so ServiceLoader is now used 
   to load plugin definitions. The Log4jPlugins.dat file will still be supported but compilation against the Log4j 3.0 
   annotation process will produce a Log4jPlugins.class instead as well as the required ServiceLoader file.
* Move the Log4j annotation processor to its own Jar. It will not be invoked by default and will not be included at runtime.
* Require Java 11 as the minimum, thus eliminating the need for multi-release jars.
* If possible, improve the wiring of plugins by implementing a minimal dependency injection system.
* Remove “strange” interfaces that had to be created before Java 8 provided default methods.

While we will strive for as much backward compatibility as possible it is possible users may have to recompile their code or make minor changes.

Thanks
Ralph

Re: Properties Enhancement in Log4j 2 3.x

Posted by Gary Gregory <ga...@gmail.com>.
I asked a few questions in the wiki comment section.

>Remove “strange” interfaces that had to be created before Java 8 provided
default methods.

Looking at our Javadoc, it seems we forgot to deprecate our copy of
BiConsumer. We did deprecate our copy of Supplier so that's good.

Gary

On Sat, Jan 8, 2022, 02:17 Ralph Goers <ra...@dslextreme.com> wrote:

> Please review and provide feedback on
> https://cwiki.apache.org/confluence/display/LOGGING/Properties+Enhancement
> .
>
> Note that some of the major goals of 3.0 are:
>
> * Fully support the Java Platform Module System by having all relevant
> jars contain a module-info.java class.
> * In support of JPMS, have log4j-core have as few dependencies as
> possible, including only requiring java.base.
> * The Log4jPlugins.dat file used in 2.x will not work well in a JPMS
> environment so ServiceLoader is now used
>    to load plugin definitions. The Log4jPlugins.dat file will still be
> supported but compilation against the Log4j 3.0
>    annotation process will produce a Log4jPlugins.class instead as well as
> the required ServiceLoader file.
> * Move the Log4j annotation processor to its own Jar. It will not be
> invoked by default and will not be included at runtime.
> * Require Java 11 as the minimum, thus eliminating the need for
> multi-release jars.
> * If possible, improve the wiring of plugins by implementing a minimal
> dependency injection system.
> * Remove “strange” interfaces that had to be created before Java 8
> provided default methods.
>
> While we will strive for as much backward compatibility as possible it is
> possible users may have to recompile their code or make minor changes.
>
> Thanks
> Ralph