7

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?

SDS
  • 828
  • 3
  • 17
  • 35

1 Answers1

4

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

Remko Popma
  • 35,130
  • 11
  • 92
  • 114
  • 1
    https://issues.apache.org/jira/browse/LOG4J2-373 I've added a comment here and Matt is following up on this. – SDS Sep 05 '14 at 13:15