[ https://issues.apache.org/jira/browse/LOG4J2-461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13845989#comment-13845989 ]
Remko Popma edited comment on LOG4J2-461 at 12/12/13 1:45 AM: -------------------------------------------------------------- (I'm copying my last comment from LOG4J2-460 here. I will mark LOG4J2-460 as a duplicate as I think it is the same underlying issue.) This looks like a classpath issue. If both the core and the api jars are on the classpath, the LogManager class (which lives in the api jar) will load implementation classes from the core jar. If the LogManager returns a org.apache.logging.log4j.simple.SimpleLoggerContext instance it means that it has been unable to find the core implementation on the classpath. Specifically, it has been unable to find the /META-INF/log4j-provider.properties file that is in the core jar. Can you print the value of system property {{java.class.path}} to the console from your application to verify that the core jar is on the classpath? was (Author: rem...@yahoo.com): (I'm copying my last comment from LOG4J2-460 here. I will mark LOG4J2-461 as a duplicate as I think it is the same underlying issue.) This looks like a classpath issue. If both the core and the api jars are on the classpath, the LogManager class (which lives in the api jar) will load implementation classes from the core jar. If the LogManager returns a org.apache.logging.log4j.simple.SimpleLoggerContext instance it means that it has been unable to find the core implementation on the classpath. Specifically, it has been unable to find the /META-INF/log4j-provider.properties file that is in the core jar. Can you print the value of system property {{java.class.path}} to the console from your application to verify that the core jar is on the classpath? > ERROR StatusLogger Unable to locate a logging implementation, using > SimpleLogger > --------------------------------------------------------------------------------- > > Key: LOG4J2-461 > URL: https://issues.apache.org/jira/browse/LOG4J2-461 > Project: Log4j 2 > Issue Type: Bug > Components: API > Affects Versions: 2.0-beta9 > Environment: Android > Reporter: Gaurav Kapoor > Priority: Blocker > > ERROR StatusLogger Unable to locate a logging implementation, using > SimpleLogger > Code: > Logger LOG = LogManager.getLogger(MainActivity.class); > LOG.error("Test Log4j2"); > {code} > <?xml version="1.0" encoding="UTF-8"?> > <Configuration> > <Appenders> > <Console name="STDOUT" target="SYSTEM_OUT"> > <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> > </Console> > </Appenders> > <Loggers> > <Logger name="hello" level="info"/> > <Root level="trace"> > <AppenderRef ref="STDOUT"/> > </Root> > </Loggers> > </Configuration> > {code} -- This message was sent by Atlassian JIRA (v6.1.4#6159) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org