Re: MongoDB 3 appender

2023-06-21 Thread Volkan Yazıcı
+1 for removing the `log4j-mongodb3` module in `main`.

Good catch with `log4j-liquibase` removal too, please proceed.

On Wed, Jun 21, 2023 at 5:04 AM Piotr P. Karwasz 
wrote:

> Hi all,
>
> According to MongoDB's lifecycle page:
>
> https://www.mongodb.com/support-policy/lifecycles
>
> MongoDB 3.x reached end-of-life in 2021.
>
> Should we drop the `log4j-mongodb3` module in Log4j 3.x?
>
> Piotr
>
> PS: We forgot to drop `log4j-liquibase` in the `main` branch. I'll do
> it shortly.
>


Re: MongoDB 3 appender

2023-06-21 Thread Matt Sicker
I’d be alright with removing it.
—
Matt Sicker

> On Jun 21, 2023, at 05:04, Piotr P. Karwasz  wrote:
> 
> Hi all,
> 
> According to MongoDB's lifecycle page:
> 
> https://www.mongodb.com/support-policy/lifecycles
> 
> MongoDB 3.x reached end-of-life in 2021.
> 
> Should we drop the `log4j-mongodb3` module in Log4j 3.x?
> 
> Piotr
> 
> PS: We forgot to drop `log4j-liquibase` in the `main` branch. I'll do
> it shortly.



Re: Optional dependencies in `log4j-core` 3.x

2023-06-21 Thread Volkan Yazıcı
+1 for removal of `jansi`

+1 for moving the YAML configuration support to a separate module

+1 for using `JsonReader` in API for reading the JSON configuration

+1 for `log4j-core-starter-async` (Shouldn't it rather be called
`log4j-core-async-starter` according to Spring Boot starter naming
conventions?)

On Mon, Jun 19, 2023 at 1:25 PM Piotr P. Karwasz 
wrote:

> Hi all,
>
> While the list of optional dependencies in `log4j-core` version 3.x is
> much shorter than the one in the 2.x series, we could probably still
> improve it a bit:
>
>  * we could remove `jansi`. Since Windows 10 the terminal supports
> standard ANSI escapes[1]. On the other hand we broke JANSI support 3
> years ago by upgrading from JANSI 1.x to 2.x[2]: the new version does
> not have the `org.fusesource.jansi.WindowsAnsiOutputStream` class we
> rely upon,
>  * we should consider removing the Jackson dependency:
> 1. it is only required by the YAML configuration format, that we
> could move to a new module,
> 2. the JSON configuration format should probably use the JSON
> parser embedded into `log4j-api`.
>  * maybe we could add some POM-only artifacts like
> `log4j-core-starter-async` that would depend on `log4j-core` and the
> recommended version of `disruptor`. The problem I find with optional
> dependencies is that consumers need to hardcode the version of the
> dependency in their POM and need to remember to upgrade it when they
> upgrade `log4j-core`. If we introduce "starters" for each optional
> dependency (LMAX disruptor, Conversant disruptor and JCTools), users
> can rely on our choice of the version.
>
> Piotr
>
> [1] https://stackoverflow.com/q/16755142/11748454
> [2]
> https://github.com/apache/logging-log4j2/commit/9fabec5277f06f59ceaeff20da055ab7bf1952c4
>


Re: MongoDB 3 appender

2023-06-21 Thread Gary Gregory
Ok to remove by me.

Gary

On Tue, Jun 20, 2023, 23:04 Piotr P. Karwasz 
wrote:

> Hi all,
>
> According to MongoDB's lifecycle page:
>
> https://www.mongodb.com/support-policy/lifecycles
>
> MongoDB 3.x reached end-of-life in 2021.
>
> Should we drop the `log4j-mongodb3` module in Log4j 3.x?
>
> Piotr
>
> PS: We forgot to drop `log4j-liquibase` in the `main` branch. I'll do
> it shortly.
>


[ANNOUNCE] Apache Log4j 3.0.0-alpha1 released

2023-06-21 Thread Ralph Goers
The Apache Log4j 2 team is pleased to announce the Log4j 3.0.0-alpha1 release!

The artifacts may be downloaded from 
https://logging.apache.org/log4j/3.x/download.html.

As the Java ecosystem has evolved, requests have been received from users, and 
the need for improved security has become more apparent, changes were 
necessariy in Log4j’s design:
• With the introduction of the Java Platform Module System (JPMS) changes 
were needed to how the various log4j modules are packaged. While not every 
log4j module is now a fully compliant JPMS module with its own module-info.java 
file, all the modules likely to be used in a JPMS environment are.
• Many optional components, such as Scripting, JNDI, JPA and JMS, have been 
moved to their own modules. This makes Log4j-core slightly smaller in 3.x and 
aids in security by not having jars with unwanted behaviors present, making 
disabling them via system properties unnecessary.
• All plugins constructed using Log4j 3.x are now located using Java’s 
ServiceLoader. This avoids many of the problems users had packaging plugins in 
"shaded" jars as that technology directly supports ServiceLoader. Plugins 
constructed using Log4j 2.x will still function in Log4j 3.x.
• Log4j’s annotation processor has been individually packaged separate from 
Log4j-core and the plugin system it enables. For applications using the module 
path this makes it easier to provide the annotation processor since it must be 
explicitly declared in those cases.
• Log4j 3.x now uses an internal dependency injection framework to allow 
plugins to be injected with instances of classes they are dependent on.
• Many system properties used by Log4j can now be set to apply to a single 
LoggerContext making configuration in application frameworks that support 
multiple applications more flexible.
• Some deprecated classes have been removed. However, every attempt has 
been made to ensure that user code compiled for Log4j 2.x will continue to 
operate with the Log4j 3.x libraries present instead.

Apache Log4j 3.0.0-alpha1 requires a minimum of Java 11 to build and run. 

For complete information on Apache Log4j 3.x, including instructions on how to 
submit bug reports, patches, or suggestions for improvement, see the Apache 
Log4j 3.x website - https://logging.apache.org/log4j/3.x/.

Changes

Added
• Allow plugins to be created through more flexible dependency injection 
patterns. (for LOG4J2-1188 by Matt Sicker)
• Allow to force LOG4J2 to use TCCL only. (for LOG4J2-2171 by rmannibucau, 
Ralph Goers)
• Allow web lookup to access more information. (for LOG4J2-2523 by Romain 
Manni-Bucau, Ralph Goers)
• Allow web lookup of session attributes. (for LOG4J2-2688 by Ralph Goers, 
Romain Manni-Bucau)
• Add support for injecting plugin configuration via builder methods. (for 
LOG4J2-2700 by Matt Sicker)
• Add scopes API for customizing plugin instance lifecycle. (for 
LOG4J2-2852 by Matt Sicker)
• Add qualifier annotations for distinguishing instances of the same type. 
(for LOG4J2-2853 by Matt Sicker)
• Create standardized dependency injection API. This is supported in 
several plugin categories and other configurable instances previously defined 
via system properties. (for LOG4J2-2854 by Matt Sicker)
• Add conditional annotations to support more declarative binding factory 
bundle classes. (for LOG4J2-3300 by Matt Sicker)
• Add built-in JSON configuration parser for a useful structured 
configuration file format which only requires the java.base module. (for 
LOG4J2-3415 by Matt Sicker)
• Add @Ordered annotation to support plugin ordering when two or more 
plugins within the same category have the same case-insensitive name. (for 
LOG4J2-857 by Matt Sicker)

Changed
• Simplify Maven site phase and align it with the one in 2.x branch. (for 
1220 by Volkan Yazıcı)
• Update build to use Java 11 bytecode. (for 480 by Ralph Goers)
• Convert documentation into AsciiDoc format. (for LOG4J2-1802 by Matt 
Sicker)
• Rename package core.util.datetime to core.time.internal.format to clarify 
these classes are to be considered private. (for LOG4J2-2224 by Remko Popma)
• Move time-related classes from core.util to core.time. Classes considered 
private moved to core.time.internal. (for LOG4J2-2225 by Remko Popma)
• Split off Kafka support into a new module log4j-kafka. (for LOG4J2-2227 
by Gary Gregory)
• Split off ZeroMq/JeroMq support into a new module log4j-jeromq. (for 
LOG4J2-2228 by Gary Gregory)
• Split off SMTP support into a new module log4j-smtp. (for LOG4J2-2230 by 
Gary Gregory)
• Split off CSV layout into a new module log4j-csv. (for LOG4J2-2231 by 
Gary Gregory)
• Split off JMS support into a new module log4j-jms. (for LOG4J2-2232 by 
Gary Gregory)
• Split off JDBC support into a new module log4j-jdbc. (for LOG4J2-2233 by 
Gary Gregory)
• Split off Jackson-based layouts into their own module