[
https://issues.apache.org/jira/browse/OPENJPA-2842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17241115#comment-17241115
]
Mark Struberg commented on OPENJPA-2842:
----------------------------------------
The problem is that we really messed this up. We changed {{openjpa.Log=log4j}}
from Log4J-1.x to 2.x somewhen in 2018.
But there are still many projects which use log4j-1.x due to various reasons.
Also TomEE has a few hacks where it does set openjpa.Log *hardcoded* to log4j.
Even if no log4j2 is available but only log4j-1.x.
To me all that indicates that we're better off having a compat layer. Logic
would be to use 2.x if that LogManager is available, otherwise 1.x.
> openjpa.Log=log4j should automatically switch between log4j-1.x and 2.x
> -----------------------------------------------------------------------
>
> Key: OPENJPA-2842
> URL: https://issues.apache.org/jira/browse/OPENJPA-2842
> Project: OpenJPA
> Issue Type: Bug
> Components: logging
> Affects Versions: 3.1.2
> Reporter: Mark Struberg
> Assignee: Mark Struberg
> Priority: Major
> Fix For: 3.1.3
>
>
> Somewhen in 2018 we added support for log4j2. Sadly we killed log4j-1.x
> support (which is still widely in use).
>
> We should automatically detect which version of log4j is available and then
> use that.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)