You have two options:
1. You can modify your other bundles to wait until a log service is
available before continuing, thus they won't try to use it before
it appears.
2. You can install the log service into start level 1 and all your
other bundles into start level 2 (look in the spec for start levels).
Approach 2 is simpler, but your bundles are more fragile and difficult
to reuse in other projects.
-> richard
On 10/27/09 5:37, Niko_K wrote:
I am trying to use the Apache Felix LogService in my own bundles to provide
logging to several bundles (i use a jdk-log delegation to make logging as
simple as possible)
However, the LogService-Bundle itself seems to start after my bundles.
Although logging is possible after some time when using a service listener,
the very first logging messages get lost since the service is not registered
at this time (they are not really lost, but they are logged by the jdk
rather than by the service).
So if i try to get a LogService ServiceReference at the beginning of the
start method in my bundles i get a null object. After some time the service
listener notices the registration of the LogService and everything works...
My question now is:
[b]Is it possible to force the LogService bundle to start before my own
bundles, so that logging is possible from the very first beginning?[/b]
Regards,
Niko
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]