You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Piotr Karwasz <pk...@apache.org> on 2024/08/09 12:20:35 UTC

Re: Should Log4j API bridges have a 3.x release?

Hi Ralph,

On 2024/04/09 21:46:28 Ralph Goers wrote:
> > On Apr 9, 2024, at 12:34 PM, Piotr P. Karwasz <pi...@gmail.com> wrote:
> > Since Log4j Core 3.x moved to `log4j-api` 2.24.0, many artifacts that
> > only depend on `log4j-api` became redundant in the 3.x branch:
> > 
> > * `log4j-iostreams`,
> > * `log4j-jpl`,
> > * `log4j-jul`,
> > * `log4j-slf4j-impl`,
> > * `log4j-slf4j2-impl`,
> > * `log4j-to-jul`,
> > * `log4j-to-slf4j`.
> Not only is 3.x compiled with Java 17 that is also the target version. If the component they are targeting also has a minimum version of Java 17 then it definitely makes sense IMO to have then in 3.x. However, SLF4J still targets Java 8 and I haven’t seen any indication that will change anytime soon.

If I interpret this correctly:

* we can remove from the `main` branch the `log4j-iostreams` artifact since it only extends `log4j-api`, which uses Java 8.
* we can remove from the `main` branch the SLF4J artifacts, since it uses Java 8 bytecode. `log4j-slf4j-impl`, `log4j-slf4j2-impl` and `log4j-to-slf4j`.
* `log4j-jpl` should stay since it requires Java 11 or more.
* What about `log4j-jul` and `log4j-to-jul`? They have a Java 17 version, although I sincerely doubt anything changed there since Java 8.

Piotr

Re: Should Log4j API bridges have a 3.x release?

Posted by "Piotr P. Karwasz" <pi...@gmail.com>.
Hi Matt,

On Fri, 9 Aug 2024 at 22:54, Matt Sicker <ma...@musigma.org> wrote:
>
> A 3.x version of `log4j-jul` isn’t strictly necessary as long as we have a META-INF/versions/9/module-info.class file in the jar.

Sure, but `log4j-jul` has some classes that use Log4j Core (to modify
the configuration using JUL). Since they are usually not necessary, we
can move them to a separate artifact.

Piotr

Re: Should Log4j API bridges have a 3.x release?

Posted by Matt Sicker <ma...@musigma.org>.
A 3.x version of `log4j-jul` isn’t strictly necessary as long as we have a META-INF/versions/9/module-info.class file in the jar.

> On Aug 9, 2024, at 15:35, Piotr P. Karwasz <pi...@gmail.com> wrote:
> 
> Hi Matt,
> 
> On Fri, 9 Aug 2024 at 20:29, Matt Sicker <ma...@musigma.org> wrote:
>> 
>> Well, one thing that changed in JUL is that it requires the java.logging module. Otherwise, the Java 8+ stuff is for the System.Logger API.
> 
> Right, maybe a 3.x version of `log4j-jul` would be useful. Besides the
> artifact has an optional dep on `log4j-core`. We might want to split
> it into 2 artifacts.
> Regarding `log4j-to-jul`, it is so rarely used, I don't see the point
> to maintain two identical versions.
> 
> Summarizing:
> 
> * `log4j-iostreams`, `log4j-slf4j-impl`, `log4j-slfj42-impl`,
> `log4j-to-jul` and `log4j-to-slf4j` could be removed from `main`.
> * `log4j-jpl` and `log4j-jul` should stay.
> 
> Do you agree?
> 
> Piotr


Re: Should Log4j API bridges have a 3.x release?

Posted by Ralph Goers <ra...@dslextreme.com>.
I am fine with this plan.

Ralph

> On Aug 9, 2024, at 1:35 PM, Piotr P. Karwasz <pi...@gmail.com> wrote:
> 
> Hi Matt,
> 
> On Fri, 9 Aug 2024 at 20:29, Matt Sicker <ma...@musigma.org> wrote:
>> 
>> Well, one thing that changed in JUL is that it requires the java.logging module. Otherwise, the Java 8+ stuff is for the System.Logger API.
> 
> Right, maybe a 3.x version of `log4j-jul` would be useful. Besides the
> artifact has an optional dep on `log4j-core`. We might want to split
> it into 2 artifacts.
> Regarding `log4j-to-jul`, it is so rarely used, I don't see the point
> to maintain two identical versions.
> 
> Summarizing:
> 
> * `log4j-iostreams`, `log4j-slf4j-impl`, `log4j-slfj42-impl`,
> `log4j-to-jul` and `log4j-to-slf4j` could be removed from `main`.
> * `log4j-jpl` and `log4j-jul` should stay.
> 
> Do you agree?
> 
> Piotr


Re: Should Log4j API bridges have a 3.x release?

Posted by "Piotr P. Karwasz" <pi...@gmail.com>.
Hi Matt,

On Fri, 9 Aug 2024 at 20:29, Matt Sicker <ma...@musigma.org> wrote:
>
> Well, one thing that changed in JUL is that it requires the java.logging module. Otherwise, the Java 8+ stuff is for the System.Logger API.

Right, maybe a 3.x version of `log4j-jul` would be useful. Besides the
artifact has an optional dep on `log4j-core`. We might want to split
it into 2 artifacts.
Regarding `log4j-to-jul`, it is so rarely used, I don't see the point
to maintain two identical versions.

Summarizing:

* `log4j-iostreams`, `log4j-slf4j-impl`, `log4j-slfj42-impl`,
`log4j-to-jul` and `log4j-to-slf4j` could be removed from `main`.
* `log4j-jpl` and `log4j-jul` should stay.

Do you agree?

Piotr

Re: Should Log4j API bridges have a 3.x release?

Posted by Matt Sicker <ma...@musigma.org>.
Well, one thing that changed in JUL is that it requires the java.logging module. Otherwise, the Java 8+ stuff is for the System.Logger API.

> On Aug 9, 2024, at 07:20, Piotr Karwasz <pk...@apache.org> wrote:
> 
> Hi Ralph,
> 
> On 2024/04/09 21:46:28 Ralph Goers wrote:
>>> On Apr 9, 2024, at 12:34 PM, Piotr P. Karwasz <pi...@gmail.com> wrote:
>>> Since Log4j Core 3.x moved to `log4j-api` 2.24.0, many artifacts that
>>> only depend on `log4j-api` became redundant in the 3.x branch:
>>> 
>>> * `log4j-iostreams`,
>>> * `log4j-jpl`,
>>> * `log4j-jul`,
>>> * `log4j-slf4j-impl`,
>>> * `log4j-slf4j2-impl`,
>>> * `log4j-to-jul`,
>>> * `log4j-to-slf4j`.
>> Not only is 3.x compiled with Java 17 that is also the target version. If the component they are targeting also has a minimum version of Java 17 then it definitely makes sense IMO to have then in 3.x. However, SLF4J still targets Java 8 and I haven’t seen any indication that will change anytime soon.
> 
> If I interpret this correctly:
> 
> * we can remove from the `main` branch the `log4j-iostreams` artifact since it only extends `log4j-api`, which uses Java 8.
> * we can remove from the `main` branch the SLF4J artifacts, since it uses Java 8 bytecode. `log4j-slf4j-impl`, `log4j-slf4j2-impl` and `log4j-to-slf4j`.
> * `log4j-jpl` should stay since it requires Java 11 or more.
> * What about `log4j-jul` and `log4j-to-jul`? They have a Java 17 version, although I sincerely doubt anything changed there since Java 8.
> 
> Piotr