You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Florian Pattke <ca...@web.de> on 2020/11/25 10:55:08 UTC
ERROR StatusLogger Log4j2 could not find a logging implementation.
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-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: ERROR StatusLogger Log4j2 could not find a logging
implementation.
Posted by Florian Pattke <ca...@web.de>.
The repo can now be found at https://github.com/cap5lut/cap5lut-capbot
Starting the "run" task in gradle should be enough to collect everything
and start everything.
Regards,
Florian
Am 25.11.2020 um 15:12 schrieb Raymond Auge:
> Could we maybe get a link to a project repo that has this behaviour?
>
> - Ray
>
> On Wed, Nov 25, 2020 at 6:00 AM Jean-Baptiste Onofre <jb...@nanthrax.net>
> wrote:
>
>> Hi Florian,
>>
>> As you using directly log2j or via pax-logging ?
>>
>> Regards
>> JB
>>
>>> Le 25 nov. 2020 à 11:55, Florian Pattke <ca...@web.de> a écrit :
>>>
>>> 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-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
--
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: ERROR StatusLogger Log4j2 could not find a logging implementation.
Posted by Raymond Auge <ra...@liferay.com.INVALID>.
Could we maybe get a link to a project repo that has this behaviour?
- Ray
On Wed, Nov 25, 2020 at 6:00 AM Jean-Baptiste Onofre <jb...@nanthrax.net>
wrote:
> Hi Florian,
>
> As you using directly log2j or via pax-logging ?
>
> Regards
> JB
>
> > Le 25 nov. 2020 à 11:55, Florian Pattke <ca...@web.de> a écrit :
> >
> > 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-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
--
*Raymond Augé* (@rotty3000)
Senior Software Architect *Liferay, Inc.* (@Liferay)
OSGi Fellow
Re: ERROR StatusLogger Log4j2 could not find a logging
implementation.
Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi Florian,
As you using directly log2j or via pax-logging ?
Regards
JB
> Le 25 nov. 2020 à 11:55, Florian Pattke <ca...@web.de> a écrit :
>
> 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-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org