ERROR StatusLogger Log4j2 could not find the registration implementation. Add log4j-core to the classpath. Using SimpleLogger to log in to the console

I have log4j-api v2.0.2 and log4j-core v2.0.2 in the pom.xml fragment project and trying to create an OSGI compatible project. 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...". 

The log4j2.xml file is located in the src / main / resources folder. I printed the class path (System.getProperties()) and both containers are loaded into the class path. Any pointers?

+5
source share
1 answer

I suspect this is a problem with the class loader with OSGi. Can you create a ticket for this log4j2 Jira tracker?

+3
source

Source: https://habr.com/ru/post/1201838/


All Articles