apache / logging-log4j2

Apache Log4j 2 is a versatile, feature-rich, efficient logging API and backend for Java.
https://logging.apache.org/log4j/2.x/
Apache License 2.0
3.39k stars 1.62k forks source link

Split CLI commands from `log4j-1.2-api` and `log4j-core` #2131

Closed ppkarwasz closed 6 months ago

ppkarwasz commented 10 months ago

There are a couple of CLI commands in the current 2.x artifacts. Their code is not used by other Log4j components.

log4j-1.2-api

log4j-1.2-api contains a Log4j1ConfigurationConverter, which shares code with the old (and disabled) Log4j1ConfigurationFactory. IMHO:

Remark that the new configuration factory used by log4j-1.2-api is based on org.apache.log4j.builders and is extensible. With some minor adjustments to the o.a.l.b.Builder interface we can switch Log4j1ConfigurationConverter to the new infrastructure and use it in openrewrite/rewrite-logging-frameworks#48.

log4j-core

Log4j Core contains a simple custom logger generator and an old copy of remkop/picocli. This should also be removed from the main code and transfered to a new artifact.

vy commented 10 months ago

I support the proposed log4j-1.2-api changes.

Log4j Core contains ... an old copy of remkop/picocli. This should also be ... transferred to a new artifact

Why do we create a log4j-picocli instead of using info.picocli:picocli?

ppkarwasz commented 10 months ago

@vy,

I meant to transfer the code that used Picocli to a new artifact and add info.picocli:picocli as a dependency. Actually I have a branch for this issue, which is almost ready to be published.

I just don't know which repo should be used: a custom logger generator doesn't match the purpose of logging-log4j-transform, on the other hand logging-log4j-tools is for internal tools only.

vy commented 10 months ago

@ppkarwasz, if we are gonna totally remove it in 3.x, I think we can lay down the separate artifact to 2.x to rest in peace.

ppkarwasz commented 6 months ago

Closed in #2435