[jira] [Commented] (LOG4J2-3601) log4j-slf4j2: change of dependency scope for log4j-core

2022-09-22 Thread Robbie Gemmell (Jira)


[ 
https://issues.apache.org/jira/browse/LOG4J2-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17608234#comment-17608234
 ] 

Robbie Gemmell commented on LOG4J2-3601:


I came to report this, but am not surprised to see it was reported already.

I agree with the others that there is definitely a long held expectation that 
the log4j slf4j[2] bridge dep supply log4j-core. I think almost every user will 
be quite surprised if it doesnt, based both on it always being that way for 
log4j-slf4j-impl and log4jslf4j18-impl, and also it being expected to be a 
'Log4J -impl' rather than 'another Log4J -api, to use your own Log4J2 API 
implementation via SLF4J'.

I would note that similar to log4j-slf4j-impl before it, the module description 
is specifically "The Apache Log4j SLF4J 2.0 API binding to Log4j 2 Core":
https://github.com/apache/logging-log4j2/blob/rel/2.19.0/log4j-slf4j2-impl/pom.xml#L28

As has been said, the folks choosing to implement the Log4J2 API themselves 
rather than use log4j-core could clearly simply exclude a 'runtime' dependency 
on -core when also using this module. Or as also said its perhaps just as 
likely they'd also choose to implement the SLF4J API themselves rather than use 
the bridge module at all.

(Though not the same project or components, it was similarly the 
related-impl-is-provided way for the older SLF4J-maintained bridge deps for 
Log4J 1.x previously, i.e for most SLF4J and Log4J users of any version it has 
likely never been any other way until 2.19.0)

> log4j-slf4j2: change of dependency scope for log4j-core
> ---
>
> Key: LOG4J2-3601
> URL: https://issues.apache.org/jira/browse/LOG4J2-3601
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: SLF4J Bridge
>Affects Versions: 2.19.0
>Reporter: Andy Seaborne
>Priority: Major
>
> The artifact {{log4j-slf4j-impl}} has a scope=runtime dependency on 
> log4j-core. {{log4j-slf4j18-impl}} similarly had scope=runtime.
> The artifact {{log4j-slf4j2-impl}} has a scope=test dependency on log4j-core.
> This changed as part of [commit 
> 8f63620875|https://github.com/apache/logging-log4j2/pull/1024/files#diff-d3ba9956a9f81420d0be3d69477a05b505746272d548ab17404aa47f3e5946b0]
>  although it seems to be unrelated.
> It makes switching over more of a bump. Previously just depending on 
> {{log4j-slf4j-impl}} was enough.
> Please switch back to a scope=runtime dependency for {{log4j-slf4j2-impl}}.
> Example:  we (Apache Jena) use slf4j in the main code base, and select log4j 
> when it needed for binaries tests so we have multiple places where the 
> dependency happens. We can change - but this may be a user experience for 
> others as well.
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.18.0:compile
> [INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.18.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-core:jar:2.18.0:runtime
> {noformat}
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j2-impl:jar:2.19.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-api:jar:2.19.0:compile
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (LOG4J2-3601) log4j-slf4j2: change of dependency scope for log4j-core

2022-09-20 Thread Andy Seaborne (Jira)


[ 
https://issues.apache.org/jira/browse/LOG4J2-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17607371#comment-17607371
 ] 

Andy Seaborne commented on LOG4J2-3601:
---

We have the internal (clean separation of api, core and impl) and external 
(user expectation of an implementation of slf4j using log4j).

The page [https://logging.apache.org/log4j/2.x/log4j-slf4j2-impl/index.html] 
does not mention log4j-core. It does refer to "the log4j jars".

Links from the requirements section on that page go to:
[https://logging.apache.org/log4j/2.x/runtime-dependencies.html] 
which gets you to 
[https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/dependencies.html#Dependency_Tree]
(there is no slf4j2 link) where log4j-core is a runtime dependency.

So there is a history of users (if they read the documentation :)) having a 
single dependency way to use log4j to provide the logging for slf4j.

With scope=runtime, there is the same degree of compile separation from 
log4j-core as scope=test.

> log4j-slf4j2: change of dependency scope for log4j-core
> ---
>
> Key: LOG4J2-3601
> URL: https://issues.apache.org/jira/browse/LOG4J2-3601
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: SLF4J Bridge
>Affects Versions: 2.19.0
>Reporter: Andy Seaborne
>Priority: Major
>
> The artifact {{log4j-slf4j-impl}} has a scope=runtime dependency on 
> log4j-core. {{log4j-slf4j18-impl}} similarly had scope=runtime.
> The artifact {{log4j-slf4j2-impl}} has a scope=test dependency on log4j-core.
> This changed as part of [commit 
> 8f63620875|https://github.com/apache/logging-log4j2/pull/1024/files#diff-d3ba9956a9f81420d0be3d69477a05b505746272d548ab17404aa47f3e5946b0]
>  although it seems to be unrelated.
> It makes switching over more of a bump. Previously just depending on 
> {{log4j-slf4j-impl}} was enough.
> Please switch back to a scope=runtime dependency for {{log4j-slf4j2-impl}}.
> Example:  we (Apache Jena) use slf4j in the main code base, and select log4j 
> when it needed for binaries tests so we have multiple places where the 
> dependency happens. We can change - but this may be a user experience for 
> others as well.
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.18.0:compile
> [INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.18.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-core:jar:2.18.0:runtime
> {noformat}
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j2-impl:jar:2.19.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-api:jar:2.19.0:compile
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (LOG4J2-3601) log4j-slf4j2: change of dependency scope for log4j-core

2022-09-20 Thread Christopher Tubbs (Jira)


[ 
https://issues.apache.org/jira/browse/LOG4J2-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17607343#comment-17607343
 ] 

Christopher Tubbs commented on LOG4J2-3601:
---

Yes, technically, for maximum user choice, it could be considered a bug "that 
log4j-slf4j-impl has a runtime dependency on log4j-core when it should not", 
rather than log4j-slf4j2-impl failing to have a runtime dependency on it. 
However, that completely ignores how users actually use intend to use this 
bridge in real life. The *whole point* of a user selecting these bridges is 
that users want to use log4j-core at runtime. This bridge should be enough get 
us there.

It makes no sense to merely use these bridges to get us to log4j-api, and then 
we have to separately make the decision to use log4j-core explicitly, because 
nobody would do that. If we wanted a runtime other than log4j-core, we wouldn't 
use these bridges at all we would use the slf4j bridge that takes us 
directly to the desired runtime. We only use this bridge because we want to be 
taken directly to log4j-core. The runtime dependency on log4j-core is the 
desired outcome. It works fine with slf4j 1.7 and log4j-slf4j-impl, and it 
should work the same (with a runtime dependency on log4j-core) with slf4j 2 and 
log4j-sfl4j2-impl.

You could decide to make log4j-slf4j-impl have a test dependency on log4j-core 
instead of fixing log4j-slf4j2-impl to have a runtime dependency on it... but 
then you're just making things harder on users, and you're inviting more bug 
reports like this one, but against the log4j-slf4j-impl jar for slf4j 1.7 uses 
as well.

As for [~rgoers] idea about a "default dependency"... I think the concept is 
neat, but ultimately, I don't think it's necessary... at least not for Maven. 
You can always "exclude" a transitive dependency and replace it with a 
different one. So, the "default dependency" is just a regular old dependency. 
If users really wanted to use this bridge to redirect to log4j-api, with a 
different runtime, they could exclude the runtime dependency on log4j-core and 
add their own pretty easily. However, as I've stated multiple times, that's not 
sensible... because any desired runtime would likely already have a direct 
bridge from slf4j, so they would just use that instead of using this bridge at 
all.

> log4j-slf4j2: change of dependency scope for log4j-core
> ---
>
> Key: LOG4J2-3601
> URL: https://issues.apache.org/jira/browse/LOG4J2-3601
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: SLF4J Bridge
>Affects Versions: 2.19.0
>Reporter: Andy Seaborne
>Priority: Major
>
> The artifact {{log4j-slf4j-impl}} has a scope=runtime dependency on 
> log4j-core. {{log4j-slf4j18-impl}} similarly had scope=runtime.
> The artifact {{log4j-slf4j2-impl}} has a scope=test dependency on log4j-core.
> This changed as part of [commit 
> 8f63620875|https://github.com/apache/logging-log4j2/pull/1024/files#diff-d3ba9956a9f81420d0be3d69477a05b505746272d548ab17404aa47f3e5946b0]
>  although it seems to be unrelated.
> It makes switching over more of a bump. Previously just depending on 
> {{log4j-slf4j-impl}} was enough.
> Please switch back to a scope=runtime dependency for {{log4j-slf4j2-impl}}.
> Example:  we (Apache Jena) use slf4j in the main code base, and select log4j 
> when it needed for binaries tests so we have multiple places where the 
> dependency happens. We can change - but this may be a user experience for 
> others as well.
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.18.0:compile
> [INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.18.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-core:jar:2.18.0:runtime
> {noformat}
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j2-impl:jar:2.19.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-api:jar:2.19.0:compile
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (LOG4J2-3601) log4j-slf4j2: change of dependency scope for log4j-core

2022-09-20 Thread Ralph Goers (Jira)


[ 
https://issues.apache.org/jira/browse/LOG4J2-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17607291#comment-17607291
 ] 

Ralph Goers commented on LOG4J2-3601:
-

I was incorrect when I looked at Log4jLoggerFactory. log4j-slf4j2-impl has no 
dependency in the code on log4j-core. So adding the log4j-core dependency makes 
it difficult to use the SLF4J2 binding with any other Log4j implementation. 
From a technical perspective the test scope is correct since the binding is 
validated with log4j-core. Unfortunately, AFAIK Maven/Gradle don't provide a 
way to specify a default dependency. If there was a way to do that we certainly 
would take advantage of that.

Unfortunately, some of our other bindings do require log4j-core.

> log4j-slf4j2: change of dependency scope for log4j-core
> ---
>
> Key: LOG4J2-3601
> URL: https://issues.apache.org/jira/browse/LOG4J2-3601
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: SLF4J Bridge
>Affects Versions: 2.19.0
>Reporter: Andy Seaborne
>Priority: Major
>
> The artifact {{log4j-slf4j-impl}} has a scope=runtime dependency on 
> log4j-core. {{log4j-slf4j18-impl}} similarly had scope=runtime.
> The artifact {{log4j-slf4j2-impl}} has a scope=test dependency on log4j-core.
> This changed as part of [commit 
> 8f63620875|https://github.com/apache/logging-log4j2/pull/1024/files#diff-d3ba9956a9f81420d0be3d69477a05b505746272d548ab17404aa47f3e5946b0]
>  although it seems to be unrelated.
> It makes switching over more of a bump. Previously just depending on 
> {{log4j-slf4j-impl}} was enough.
> Please switch back to a scope=runtime dependency for {{log4j-slf4j2-impl}}.
> Example:  we (Apache Jena) use slf4j in the main code base, and select log4j 
> when it needed for binaries tests so we have multiple places where the 
> dependency happens. We can change - but this may be a user experience for 
> others as well.
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.18.0:compile
> [INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.18.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-core:jar:2.18.0:runtime
> {noformat}
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j2-impl:jar:2.19.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-api:jar:2.19.0:compile
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (LOG4J2-3601) log4j-slf4j2: change of dependency scope for log4j-core

2022-09-20 Thread Andy Seaborne (Jira)


[ 
https://issues.apache.org/jira/browse/LOG4J2-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17607206#comment-17607206
 ] 

Andy Seaborne commented on LOG4J2-3601:
---

Hi [~pkarwasz],

One of the things Jena provides is a code library so this report is a proxy for 
our downstream users who may encounter the situation when going 
{{log4j-slf4j-impl}} to {{log4j-slf4j2-impl}}. Our user are interested in data, 
and software development is often not their main focus. We also have to 
consider how our users upgrade and how we let them know what's happening.

An optional dependency doesn't change the situation. The dependency would have 
to be added unlike with the current {{log4j-slf4j-impl}}. Different consistency!

For the Jena binary products that are self contained (the RDF server, and the 
command line tools), we add {{log4j-core}}. Its the library usage that exposes 
the change.


> log4j-slf4j2: change of dependency scope for log4j-core
> ---
>
> Key: LOG4J2-3601
> URL: https://issues.apache.org/jira/browse/LOG4J2-3601
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: SLF4J Bridge
>Affects Versions: 2.19.0
>Reporter: Andy Seaborne
>Priority: Major
>
> The artifact {{log4j-slf4j-impl}} has a scope=runtime dependency on 
> log4j-core. {{log4j-slf4j18-impl}} similarly had scope=runtime.
> The artifact {{log4j-slf4j2-impl}} has a scope=test dependency on log4j-core.
> This changed as part of [commit 
> 8f63620875|https://github.com/apache/logging-log4j2/pull/1024/files#diff-d3ba9956a9f81420d0be3d69477a05b505746272d548ab17404aa47f3e5946b0]
>  although it seems to be unrelated.
> It makes switching over more of a bump. Previously just depending on 
> {{log4j-slf4j-impl}} was enough.
> Please switch back to a scope=runtime dependency for {{log4j-slf4j2-impl}}.
> Example:  we (Apache Jena) use slf4j in the main code base, and select log4j 
> when it needed for binaries tests so we have multiple places where the 
> dependency happens. We can change - but this may be a user experience for 
> others as well.
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.18.0:compile
> [INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.18.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-core:jar:2.18.0:runtime
> {noformat}
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j2-impl:jar:2.19.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-api:jar:2.19.0:compile
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (LOG4J2-3601) log4j-slf4j2: change of dependency scope for log4j-core

2022-09-19 Thread Ralph Goers (Jira)


[ 
https://issues.apache.org/jira/browse/LOG4J2-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17606784#comment-17606784
 ] 

Ralph Goers commented on LOG4J2-3601:
-

[~pkarwasz] I originally thought the log4j-core should be optional but then I 
looked at Log4jLoggerFactory and noticed that it has a hard dependency on 
Log4j-core. So IMO this does need to be a runtime dependency.

> log4j-slf4j2: change of dependency scope for log4j-core
> ---
>
> Key: LOG4J2-3601
> URL: https://issues.apache.org/jira/browse/LOG4J2-3601
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: SLF4J Bridge
>Affects Versions: 2.19.0
>Reporter: Andy Seaborne
>Priority: Major
>
> The artifact {{log4j-slf4j-impl}} has a scope=runtime dependency on 
> log4j-core. {{log4j-slf4j18-impl}} similarly had scope=runtime.
> The artifact {{log4j-slf4j2-impl}} has a scope=test dependency on log4j-core.
> This changed as part of [commit 
> 8f63620875|https://github.com/apache/logging-log4j2/pull/1024/files#diff-d3ba9956a9f81420d0be3d69477a05b505746272d548ab17404aa47f3e5946b0]
>  although it seems to be unrelated.
> It makes switching over more of a bump. Previously just depending on 
> {{log4j-slf4j-impl}} was enough.
> Please switch back to a scope=runtime dependency for {{log4j-slf4j2-impl}}.
> Example:  we (Apache Jena) use slf4j in the main code base, and select log4j 
> when it needed for binaries tests so we have multiple places where the 
> dependency happens. We can change - but this may be a user experience for 
> others as well.
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.18.0:compile
> [INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.18.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-core:jar:2.18.0:runtime
> {noformat}
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j2-impl:jar:2.19.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-api:jar:2.19.0:compile
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (LOG4J2-3601) log4j-slf4j2: change of dependency scope for log4j-core

2022-09-19 Thread Piotr Karwasz (Jira)


[ 
https://issues.apache.org/jira/browse/LOG4J2-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17606783#comment-17606783
 ] 

Piotr Karwasz commented on LOG4J2-3601:
---

[~ctubbsii],

The reason I didn't put {{log4j-core}} as runtime dependency for 
{{log4j-slf4j2-impl}} is for consistency with {{log4j-to-slf4j}} that does not 
list {{logback-classic}} as runtime dependency.

However I agree that most users will use {{log4j-slf4j2-impl}} to bind SLF4J to 
Log4j2 Core and, although I might not like it, this change should be 
implemented.

IMHO software that ships with Log4j2 Core as its logging backend, should 
declare a runtime dependency on `log4j-core`.

> log4j-slf4j2: change of dependency scope for log4j-core
> ---
>
> Key: LOG4J2-3601
> URL: https://issues.apache.org/jira/browse/LOG4J2-3601
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: SLF4J Bridge
>Affects Versions: 2.19.0
>Reporter: Andy Seaborne
>Priority: Major
>
> The artifact {{log4j-slf4j-impl}} has a scope=runtime dependency on 
> log4j-core. {{log4j-slf4j18-impl}} similarly had scope=runtime.
> The artifact {{log4j-slf4j2-impl}} has a scope=test dependency on log4j-core.
> This changed as part of [commit 
> 8f63620875|https://github.com/apache/logging-log4j2/pull/1024/files#diff-d3ba9956a9f81420d0be3d69477a05b505746272d548ab17404aa47f3e5946b0]
>  although it seems to be unrelated.
> It makes switching over more of a bump. Previously just depending on 
> {{log4j-slf4j-impl}} was enough.
> Please switch back to a scope=runtime dependency for {{log4j-slf4j2-impl}}.
> Example:  we (Apache Jena) use slf4j in the main code base, and select log4j 
> when it needed for binaries tests so we have multiple places where the 
> dependency happens. We can change - but this may be a user experience for 
> others as well.
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.18.0:compile
> [INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.18.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-core:jar:2.18.0:runtime
> {noformat}
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j2-impl:jar:2.19.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-api:jar:2.19.0:compile
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (LOG4J2-3601) log4j-slf4j2: change of dependency scope for log4j-core

2022-09-19 Thread Christopher Tubbs (Jira)


[ 
https://issues.apache.org/jira/browse/LOG4J2-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17606750#comment-17606750
 ] 

Christopher Tubbs commented on LOG4J2-3601:
---

[~pkarwasz] It does not make sense to use log4j-slf4j2-impl as the slf4j 
binding, then to put in something other than log4j-core. That's not how users 
use this dependency. The whole point in using the log4j-slf4j2-impl binding (or 
the log4j-slf4j-impl binding for slf4j 1.7) is that the user wants slf4j logs 
to go to log4j. If they wanted a different runtime, they wouldn't use this 
jar... they'd use a different slf4j binding directly to that implementation. 
The whole point is that users use these impl bindings to get logs sent to 
log4j-core. It should not be optional.

Another reason why it doesn't make sense to make it optional, is that it is 
inconsistent with how log4j-slf4j-impl and log4j-slf4j18-impl were configured. 
log4j-slf4j2-impl should behave the same way log4j-slf4j-impl does, with 
log4j-core as a runtime dependency. They should be consistent. Having 
log4j-slf4j-impl and log4j-slf4j18-impl have a runtime dependency on log4j-core 
was never a problem. It should not be a problem to have log4j-sfl4j2-impl 
behave the same.

Marking the dependency as "optional" isn't a solution... it's just enshrining 
the bug being reported here. Users can already explicitly add log4j-core as a 
dependency, so it's effectively already optional. The point is that they 
shouldn't have to, just like they don't have to with log4j-slf4j-impl.

> log4j-slf4j2: change of dependency scope for log4j-core
> ---
>
> Key: LOG4J2-3601
> URL: https://issues.apache.org/jira/browse/LOG4J2-3601
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: SLF4J Bridge
>Affects Versions: 2.19.0
>Reporter: Andy Seaborne
>Priority: Major
>
> The artifact {{log4j-slf4j-impl}} has a scope=runtime dependency on 
> log4j-core. {{log4j-slf4j18-impl}} similarly had scope=runtime.
> The artifact {{log4j-slf4j2-impl}} has a scope=test dependency on log4j-core.
> This changed as part of [commit 
> 8f63620875|https://github.com/apache/logging-log4j2/pull/1024/files#diff-d3ba9956a9f81420d0be3d69477a05b505746272d548ab17404aa47f3e5946b0]
>  although it seems to be unrelated.
> It makes switching over more of a bump. Previously just depending on 
> {{log4j-slf4j-impl}} was enough.
> Please switch back to a scope=runtime dependency for {{log4j-slf4j2-impl}}.
> Example:  we (Apache Jena) use slf4j in the main code base, and select log4j 
> when it needed for binaries tests so we have multiple places where the 
> dependency happens. We can change - but this may be a user experience for 
> others as well.
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.18.0:compile
> [INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.18.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-core:jar:2.18.0:runtime
> {noformat}
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j2-impl:jar:2.19.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-api:jar:2.19.0:compile
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (LOG4J2-3601) log4j-slf4j2: change of dependency scope for log4j-core

2022-09-19 Thread Piotr Karwasz (Jira)


[ 
https://issues.apache.org/jira/browse/LOG4J2-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17606725#comment-17606725
 ] 

Piotr Karwasz commented on LOG4J2-3601:
---

[~andy],

Thank you for reporting this issue.

Personally I am not sure it is a problem, since Log4j2 Core is not the only 
Log4j2 API implementation out there (even if we exclude Log4j2-to-Slf4j). Would 
an *optional* runtime dependency on {{log4j-core}} be a solution? [~rgoers], 
what do you think?

> log4j-slf4j2: change of dependency scope for log4j-core
> ---
>
> Key: LOG4J2-3601
> URL: https://issues.apache.org/jira/browse/LOG4J2-3601
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: SLF4J Bridge
>Affects Versions: 2.19.0
>Reporter: Andy Seaborne
>Priority: Major
>
> The artifact {{log4j-slf4j-impl}} has a scope=runtime dependency on 
> log4j-core. {{log4j-slf4j18-impl}} similarly had scope=runtime.
> The artifact {{log4j-slf4j2-impl}} has a scope=test dependency on log4j-core.
> This changed as part of [commit 
> 8f63620875|https://github.com/apache/logging-log4j2/pull/1024/files#diff-d3ba9956a9f81420d0be3d69477a05b505746272d548ab17404aa47f3e5946b0]
>  although it seems to be unrelated.
> It makes switching over more of a bump. Previously just depending on 
> {{log4j-slf4j-impl}} was enough.
> Please switch back to a scope=runtime dependency for {{log4j-slf4j2-impl}}.
> Example:  we (Apache Jena) use slf4j in the main code base, and select log4j 
> when it needed for binaries tests so we have multiple places where the 
> dependency happens. We can change - but this may be a user experience for 
> others as well.
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.18.0:compile
> [INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.18.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-core:jar:2.18.0:runtime
> {noformat}
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j2-impl:jar:2.19.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-api:jar:2.19.0:compile
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (LOG4J2-3601) log4j-slf4j2: change of dependency scope for log4j-core

2022-09-19 Thread Ralph Goers (Jira)


[ 
https://issues.apache.org/jira/browse/LOG4J2-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17606714#comment-17606714
 ] 

Ralph Goers commented on LOG4J2-3601:
-

Note that we don't assign fix versions until the fix is committed.

> log4j-slf4j2: change of dependency scope for log4j-core
> ---
>
> Key: LOG4J2-3601
> URL: https://issues.apache.org/jira/browse/LOG4J2-3601
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: SLF4J Bridge
>Reporter: Andy Seaborne
>Priority: Major
>
> The artifact {{log4j-slf4j-impl}} has a scope=runtime dependency on 
> log4j-core. {{log4j-slf4j18-impl}} similarly had scope=runtime.
> The artifact {{log4j-slf4j2-impl}} has a scope=test dependency on log4j-core.
> This changed as part of [commit 
> 8f63620875|https://github.com/apache/logging-log4j2/pull/1024/files#diff-d3ba9956a9f81420d0be3d69477a05b505746272d548ab17404aa47f3e5946b0]
>  although it seems to be unrelated.
> It makes switching over more of a bump. Previously just depending on 
> {{log4j-slf4j-impl}} was enough.
> Please switch back to a scope=runtime dependency for {{log4j-slf4j2-impl}}.
> Example:  we (Apache Jena) use slf4j in the main code base, and select log4j 
> when it needed for binaries tests so we have multiple places where the 
> dependency happens. We can change - but this may be a user experience for 
> others as well.
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.18.0:compile
> [INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.18.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-core:jar:2.18.0:runtime
> {noformat}
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j2-impl:jar:2.19.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-api:jar:2.19.0:compile
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (LOG4J2-3601) log4j-slf4j2: change of dependency scope for log4j-core

2022-09-19 Thread Christopher Tubbs (Jira)


[ 
https://issues.apache.org/jira/browse/LOG4J2-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17606713#comment-17606713
 ] 

Christopher Tubbs commented on LOG4J2-3601:
---

FWIW, the fix version is incorrect. 2.19.0 is already released without this 
fix. 2.19.0 is the affected version, and 2.19.1 should be the fix version.

> log4j-slf4j2: change of dependency scope for log4j-core
> ---
>
> Key: LOG4J2-3601
> URL: https://issues.apache.org/jira/browse/LOG4J2-3601
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: SLF4J Bridge
>Reporter: Andy Seaborne
>Priority: Major
> Fix For: 2.19.0
>
>
> The artifact {{log4j-slf4j-impl}} has a scope=runtime dependency on 
> log4j-core. {{log4j-slf4j18-impl}} similarly had scope=runtime.
> The artifact {{log4j-slf4j2-impl}} has a scope=test dependency on log4j-core.
> This changed as part of [commit 
> 8f63620875|https://github.com/apache/logging-log4j2/pull/1024/files#diff-d3ba9956a9f81420d0be3d69477a05b505746272d548ab17404aa47f3e5946b0]
>  although it seems to be unrelated.
> It makes switching over more of a bump. Previously just depending on 
> {{log4j-slf4j-impl}} was enough.
> Please switch back to a scope=runtime dependency for {{log4j-slf4j2-impl}}.
> Example:  we (Apache Jena) use slf4j in the main code base, and select log4j 
> when it needed for binaries tests so we have multiple places where the 
> dependency happens. We can change - but this may be a user experience for 
> others as well.
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.18.0:compile
> [INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.18.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-core:jar:2.18.0:runtime
> {noformat}
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j2-impl:jar:2.19.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-api:jar:2.19.0:compile
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (LOG4J2-3601) log4j-slf4j2: change of dependency scope for log4j-core

2022-09-19 Thread Christopher Tubbs (Jira)


[ 
https://issues.apache.org/jira/browse/LOG4J2-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17606710#comment-17606710
 ] 

Christopher Tubbs commented on LOG4J2-3601:
---

This bit us when we tried to update to slf4j 2.0.1 with log4j-slf4j2-impl.

See this partial diff comparing log4j-slf4j-impl and the new log4j-slf4j2-impl. 
Their dependency on log4j-core should be the same: runtime.

{code}
--- 
~/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.19.0/log4j-slf4j-impl-2.19.0.pom
   2022-09-19 14:20:09.033906470 -0400
+++ 
~/.m2/repository/org/apache/logging/log4j/log4j-slf4j2-impl/2.19.0/log4j-slf4j2-impl-2.19.0.pom
 2022-09-18 20:50:31.103647811 -0400
@@ -23,15 +23,13 @@
 2.19.0
   
-  log4j-slf4j-impl
+  log4j-slf4j2-impl
   jar
-  Apache Log4j SLF4J Binding
-  The Apache Log4j SLF4J API binding to Log4j 2 Core
+  Apache Log4j SLF4J 2.0 Binding
+  The Apache Log4j SLF4J 2.0 API binding to Log4j 2 
Core
   
 ${basedir}/..
 SLF4J Documentation
-/slf4j-impl
-
-1.7.25
+/slf4j2-impl
+2.0.0
 org.apache.logging.log4j.slf4j
 true
@@ -56,5 +54,5 @@
   org.apache.logging.log4j
   log4j-core
-  runtime
+  test
 
 
{code}

> log4j-slf4j2: change of dependency scope for log4j-core
> ---
>
> Key: LOG4J2-3601
> URL: https://issues.apache.org/jira/browse/LOG4J2-3601
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: SLF4J Bridge
>Reporter: Andy Seaborne
>Priority: Major
> Fix For: 2.19.0
>
>
> The artifact {{log4j-slf4j-impl}} has a scope=runtime dependency on 
> log4j-core. {{log4j-slf4j18-impl}} similarly had scope=runtime.
> The artifact {{log4j-slf4j2-impl}} has a scope=test dependency on log4j-core.
> This changed as part of [commit 
> 8f63620875|https://github.com/apache/logging-log4j2/pull/1024/files#diff-d3ba9956a9f81420d0be3d69477a05b505746272d548ab17404aa47f3e5946b0]
>  although it seems to be unrelated.
> It makes switching over more of a bump. Previously just depending on 
> {{log4j-slf4j-impl}} was enough.
> Please switch back to a scope=runtime dependency for {{log4j-slf4j2-impl}}.
> Example:  we (Apache Jena) use slf4j in the main code base, and select log4j 
> when it needed for binaries tests so we have multiple places where the 
> dependency happens. We can change - but this may be a user experience for 
> others as well.
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.18.0:compile
> [INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.18.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-core:jar:2.18.0:runtime
> {noformat}
> {noformat}
> [INFO] +- org.apache.logging.log4j:log4j-slf4j2-impl:jar:2.19.0:compile
> [INFO] |  \- org.apache.logging.log4j:log4j-api:jar:2.19.0:compile
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)