Hi Gary,

On 21.01.2025 13:46, Gary Gregory wrote:
This all sounds very confusing to me. Using this scheme, I could
create a set of dependencies on 2.x with empty jars that don't work on
3.x (because I picked the wrong jars). There is no way to verify that
what I'm doing on 2.x will work on 3.x without trying it on 3.x, so...
or am I missing something?

The list of optional features in Log4j 2 is quite limited and documented, I don't think there is a way to add the wrong dependencies. Basically we have two choices:

* Tell users that they need to add `jackson-dataformat-yaml` to use the YAML configuration format. This is what we do today.

* Tell users that they need to add `log4j-config-yaml` to use the YAML configuration format and make it depend on `jackson-dataformat-yaml`. If they only add `jackson-dataformat-yaml`, it will still work in 2.x.

The first option only works with Log4j 2, the second one would work with Log4j 2 and 3. That is all there is.

Piotr

[1] https://logging.apache.org/log4j/3.x/migrate-from-log4j2.html

Reply via email to