You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Mark Struberg (Jira)" <ji...@apache.org> on 2020/12/01 07:58:00 UTC

[jira] [Comment Edited] (OPENJPA-2842) openjpa.Log=log4j should automatically switch between log4j-1.x and 2.x

    [ https://issues.apache.org/jira/browse/OPENJPA-2842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17241326#comment-17241326 ] 

Mark Struberg edited comment on OPENJPA-2842 at 12/1/20, 7:57 AM:
------------------------------------------------------------------

Yes it was unintended and thus is a bug more or less. But revert is not possible anymore. People are using it in the field. And having just {{log4j}} is not wrong from a user POV.

I created a really simple solution for it. Testing it right now in a customer project where this popped up:

[https://github.com/struberg/openjpa/commit/21123ac51cb4f62c17df8eff0df476116f3f3f75]

If it works out I'll commit it later today.

 

And TomEE *does* set it:

[https://github.com/apache/tomee/blob/a0744f950f12a106bbb482522d2e767782134b5c/container/openejb-core/src/main/java/org/apache/openejb/util/Log4jLogStreamFactory.java#L65]

Sadly this also overwrites *anything* you set via -Dopenjpa.Log as well :(


was (Author: struberg):
Yes it was unintended and thus is a bug more or less. But revert is not possible anymore. People are using it in the field. And having just {{log4j}} is not wrong from a user POV.

I created a really simple solution for it. Testing it right now in a customer project where this popped up:

[https://github.com/struberg/openjpa/commit/21123ac51cb4f62c17df8eff0df476116f3f3f75]

If it works out I'll commit it later today.

> 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)