Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console

I've log4j-api v2.0.2 and log4j-core v2.0.2 in the pom.xml of a fragment project and trying to build a project thats OSGI compliant. I get the following message

 "ERROR StatusLogger Log4j2 could not find a logging implementation. 
    Please add log4j-core to the classpath. Using SimpleLogger to log to the
    console...".

log4j2.xml file is under src/main/resources folder. I printed the class path (System.getProperties()) and both the jar's are loaded in the classpath. Any pointers?

like image 621
SDS Avatar asked Sep 04 '14 15:09

SDS


1 Answers

I suspect this is a classloader issue with OSGi. Can you create a ticket for this on the log4j2 Jira issue tracker?

like image 193
Remko Popma Avatar answered Sep 28 '22 02:09

Remko Popma