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-461) ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger
Date Thu, 12 Dec 2013 01:47:07 GMT

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

Remko Popma commented on LOG4J2-461:
------------------------------------

(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-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message