logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-230) Preempt StackOverflowEx when both slf4j-impl jar and log4j-to-slf4j jar are on the classpath
Date Wed, 01 May 2013 16:26:16 GMT

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

Remko Popma commented on LOG4J2-230:
------------------------------------

Oops. grin :-)

we independently found the same problem.

The code is now 

    public SLF4JLoggerContextFactory() {
        // LOG4J2-230, LOG4J2-204 (improve error reporting when misconfigured)
        boolean misconfigured = false;
        try {
            Class.forName("org.slf4j.helpers.Log4JLoggerFactory");
            misconfigured = true;
        } catch (Throwable classNotFoundIsGood) {
            // org.slf4j.helpers.Log4JLoggerFactory is not on classpath. Good!
        }
        if (misconfigured) {
            throw new IllegalStateException("slf4j-impl jar is mutually exclusive with log4j-to-slf4j
jar "
                    + "(the first routes calls from SLF4J to Log4j, the second from Log4j
to SLF4J)");
        }
    }

Committed revision 1478075
                
> Preempt StackOverflowEx when both slf4j-impl jar and log4j-to-slf4j jar are on the classpath
> --------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-230
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-230
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: SLF4J Bridge
>    Affects Versions: 2.0-beta5
>            Reporter: Remko Popma
>
> This ticket is to prevent issues like LOG4J2-204.
> Aiming for something similar to what is documented here:
> http://www.slf4j.org/codes.html#jclDelegationLoop

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message