log4j

2012-05-03 Thread maaruks
Is it possible to use log4j in karaf ? I have log4j classes in my bundle but I cant access them: try { Class? aClass = Class.forName(org.apache.log4j.Appender); } catch (ClassNotFoundException e) { throw new RuntimeException(e); }

Re: log4j

2012-05-03 Thread Achim Nierbeck
I'm not sure what you are trying to do, but log4j as slf4j and a couple more logging framworks are supported by Karaf. We use Pax Logging for this, log4j is even the underlying implementation for logging. If you want to use your own appenders you need to take special care for this. Regards, Achim

Re: log4j

2012-05-03 Thread Guillaume Nodet
Custom appenders can be deployed by using fragments attached to the pax-logging-service bundle fwiw. On Thu, May 3, 2012 at 1:21 PM, Achim Nierbeck bcanh...@googlemail.comwrote: I'm not sure what you are trying to do, but log4j as slf4j and a couple more logging framworks are supported by

Re: Is there a way to query osgi framework status (e.g. started)?

2012-05-03 Thread Jean-Baptiste Onofré
Hi, you can add a BundleListener and check if the state of the bundle of ID 0. Anyway it looks weird to me to define some logic at startup. Why not using a bootFeature or a startup bundle ? Regards JB On 05/03/2012 05:28 PM, bobshort wrote: We have bundles that do some intensive

Re: Is there a way to query osgi framework status (e.g. started)?

2012-05-03 Thread Guillaume Nodet
There's no such thing as a 'started' state. The osgi framework is fully asynchronous and things can even be done on behalf of other bundles. The only real way to know if 'something' is started is to have this thing register an osgi service when started and wait for this service to be registered.

Re: Is there a way to query osgi framework status (e.g. started)?

2012-05-03 Thread bobshort
Thanks for the replies! The main thing I'm trying to accomplish is to not start expensive processing while the framework is booting. On a embedded ARM device it can take framework startup times from 2 min to +5 min. I was thinking of trying a bundle with a very high run level and use it to