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

1

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?

Beliabelial answered 4/9, 2014 at 15:41 Comment(0)
B
4

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

Brahma answered 5/9, 2014 at 8:30 Comment(1)
issues.apache.org/jira/browse/LOG4J2-373 I've added a comment here and Matt is following up on this.Beliabelial

© 2022 - 2024 — McMap. All rights reserved.