Hi,The easy way is to use slf4j.regards,FrancoisEnvoyé depuis mon smartphone 
Samsung Galaxy.
-------- Message d'origine --------De : matthiaw <[email protected]> Date : 
30/05/2019  14:45  (GMT+04:00) À : [email protected] Objet : Log4j2 in 
osgi-bundle I want to use log4j2 in my osgi-bundle for karaf. When i add log4j 
into thepom, compile it and load it into karaf, then the exceptionUnresolved 
requirements: [[... [56](R 56.0)] 
osgi.wiring.package;(&(osgi.wiring.package=*org.apache.logging.log4j*)(version>=2.11.0)(!(version>=3.0.0)))]is
 thrown. This must be, because i not added something tomaven-bundle-plugin. Bot 
when i add there<Private-Package>..., 
org.apache.logging.log4j*</Private-Package> or<Private-Package>..., 
*</Private-Package> i get the exceptionUnresolved requirements: [[... [57](R 
57.0)] 
osgi.wiring.package;(osgi.wiring.package=*com.conversantmedia.util.concurrent*)]Looking
 for the package gets me to adding<dependency>    
<groupId>com.conversantmedia</groupId>    <artifactId>disruptor</artifactId>    
<version>1.2.0</version></dependency>to the pom. Now i get Unresolved 
requirements: [[... [58](R 58.0)] 
osgi.wiring.package;(osgi.wiring.package=*com.fasterxml.jackson.annotation*)]Is 
it necessary that i add all depended libraries for log4j manually to thepom to 
get a working bundle? Or is there a better way?I am new to osgi and karaf. How 
can i add log4j accurate in a osgi-bundle,so its log is shown in karaf 
log:display?Regards,Matthias--Sent from: 
http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Reply via email to