Hello everyone,

I am having trouble getting Log4J2 to work because it can not find the
core and I can't find resources that help me.

I'm running the whole project through IntelliJ IDEA + Gradle
(build.gradle:
https://gist.github.com/cap5lut/bd1c6cf340f7d70e82c9a30f674b5fea)
I am using AdoptOpenJdk 11.0.4 as runtime and Apache Felix 6.0.3 as OSGi
container.

Here is the small Apache Felix configuration file:
https://gist.github.com/f09ecdbc0e5ce7da1f75854d646b44ae

To test if Log4J2 actually works I wrote a small test bundle containing
only the bundle activator
(https://gist.github.com/7d88596eae97471584c38377cc6174a1)

Once I start the application all bundles are started (or for the
fragment bundles resolved):
START LEVEL 1
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (6.0.3)|6.0.3
    1|Active     |    1|org.objectweb.asm (9.0.0)|9.0.0
    2|Active     |    1|org.objectweb.asm.tree.analysis (9.0.0)|9.0.0
    3|Active     |    1|org.objectweb.asm.commons (9.0.0)|9.0.0
    4|Active     |    1|org.objectweb.asm.tree (9.0.0)|9.0.0
    5|Active     |    1|org.objectweb.asm.util (9.0.0)|9.0.0
    6|Active     |    1|cap5lut-service-test
(1.0.0.SNAPSHOT)|1.0.0.SNAPSHOT
    7|Active     |    1|JLine Bundle (3.7.0)|3.7.0
    8|Active     |    1|Apache Log4j API (2.14.0)|2.14.0
    9|Active     |    1|Apache Log4j Core (2.14.0)|2.14.0
   10|Active     |    1|Apache Aries SPI Fly Dynamic Weaving Bundle
(1.3.2)|1.3.2
   11|Resolved   |    1|Apache Aries SPI Fly Dynamic Weaving Framework
Extension (1.3.2)|1.3.2
   12|Active     |    1|Apache Felix Gogo Command (1.1.0)|1.1.0
   13|Active     |    1|Apache Felix Gogo JLine Shell (1.1.0)|1.1.0
   14|Active     |    1|Apache Felix Gogo Runtime (1.1.0)|1.1.0

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

From my little understanding of the OSGi logs I thought everything
would be wired correctly as I dont see any warnings or errors, but that
doesnt seem to be the case.
So here are the complete logs
https://gist.github.com/edfebf1663103b2415d2890d8cf151a7

What do I do wrong?

Regards,
cap5lut


--
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to