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-660) RunLogback throws ClassCastException
Date Sun, 06 Jul 2014 13:15:34 GMT

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

Remko Popma commented on LOG4J2-660:

Sorry for taking so long to get back.

I believe this error only occurs if slf4j-api cannot find an slf4j implementation.
Did you put both the logback-core-1.0.13.jar and logback-classic-1.0.13.jar files in the classpath?

(I actually also have slf4j-ext-1.7.7.jar in the classpath, but I am not sure if that is required...)

> RunLogback throws  ClassCastException
> -------------------------------------
>                 Key: LOG4J2-660
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-660
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-rc1
>         Environment: MackBook ME865 , OS X 10.9.3 
>            Reporter: QiChengWei
>            Assignee: Remko Popma
>            Priority: Minor
> execute the main in the PerfTestDriver ,  running the  tests
> tests.add(m("perf-logback.xml", LOGBK, "Sync", i));  cause a ClassCastException
> stacktrace as follows:
> Exception in thread "Thread-1" java.lang.ClassCastException: org.slf4j.helpers.SubstituteLogger
cannot be cast to ch.qos.logback.classic.Logger
> 	at org.apache.logging.log4j.core.async.perftest.RunLogback.runThroughputTest(RunLogback.java:37)
> 	at org.apache.logging.log4j.core.async.perftest.PerfTest.runTest(PerfTest.java:182)
> 	at org.apache.logging.log4j.core.async.perftest.MtPerfTest$1.run(MtPerfTest.java:46)
> 	at java.lang.Thread.run(Thread.java:745)
> SLF4J: The following set of substitute loggers may have been accessed
> SLF4J: during the initialization phase. Logging calls during this
> SLF4J: phase were not honored. However, subsequent logging calls to these
> SLF4J: loggers will work as normally expected.
> SLF4J: See also http://www.slf4j.org/codes.html#substituteLogger
> SLF4J: org.apache.logging.log4j.core.async.perftest.RunLogback

This message was sent by Atlassian JIRA

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

View raw message